From: Roland Dreier Date: Tue, 4 Nov 2008 19:18:56 +0000 (-0800) Subject: mlx4_core: Fix unused variable warning X-Git-Tag: v2.6.28-rc5~61^2^5~1 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b0f5df4c88bac46fe749d36d905fc7ad0296587;p=linux-2.6-omap-h63xx.git mlx4_core: Fix unused variable warning Fix drivers/net/mlx4/profile.c:55: warning: 'res_name' defined but not used by making mlx4_dbg() always use all of its parameters, regardless of whether CONFIG_MLX4_DEBUG is set or not. Reported-by: Alexander Beregalov Signed-off-by: Roland Dreier --- diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index fa431fad0ee..56a2e213fe6 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -87,6 +87,9 @@ enum { #ifdef CONFIG_MLX4_DEBUG extern int mlx4_debug_level; +#else /* CONFIG_MLX4_DEBUG */ +#define mlx4_debug_level (0) +#endif /* CONFIG_MLX4_DEBUG */ #define mlx4_dbg(mdev, format, arg...) \ do { \ @@ -94,12 +97,6 @@ extern int mlx4_debug_level; dev_printk(KERN_DEBUG, &mdev->pdev->dev, format, ## arg); \ } while (0) -#else /* CONFIG_MLX4_DEBUG */ - -#define mlx4_dbg(mdev, format, arg...) do { (void) mdev; } while (0) - -#endif /* CONFIG_MLX4_DEBUG */ - #define mlx4_err(mdev, format, arg...) \ dev_err(&mdev->pdev->dev, format, ## arg) #define mlx4_info(mdev, format, arg...) \