Skip to content

Commit

Permalink
mlx4_core: Fix unused variable warning
Browse files Browse the repository at this point in the history
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 <a.beregalov@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Roland Dreier committed Nov 4, 2008
1 parent 332edc2 commit 7b0f5df
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/net/mlx4/mlx4.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,16 @@ 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 { \
if (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...) \
Expand Down

0 comments on commit 7b0f5df

Please sign in to comment.