aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-05-07 15:52:57 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-08 23:42:02 -0400
commit1a91de28831a1bd913e14dacf25763f3672e24a9 (patch)
tree56f55430eea04df61b8fa71d4405908630aa6127 /drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
parent2db2a15abfb2c72dc2717236659dced6ba1c6d6b (diff)
mellanox: Logging message cleanups
Use a more current logging style. o Coalesce formats o Add missing spaces for coalesced formats o Align arguments for modified formats o Add missing newlines for some logging messages o Use DRV_NAME as part of format instead of %s, DRV_NAME to reduce overall text. o Use ..., ##__VA_ARGS__ instead of args... in macros o Correct a few format typos o Use a single line message where appropriate Signed-off-by: Joe Perches <joe@perches.com> Acked-By: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4_en.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4_en.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
index 04d9b6fe3e80..b5db1bf361dc 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -830,26 +830,26 @@ __printf(3, 4)
830int en_print(const char *level, const struct mlx4_en_priv *priv, 830int en_print(const char *level, const struct mlx4_en_priv *priv,
831 const char *format, ...); 831 const char *format, ...);
832 832
833#define en_dbg(mlevel, priv, format, arg...) \ 833#define en_dbg(mlevel, priv, format, ...) \
834do { \ 834do { \
835 if (NETIF_MSG_##mlevel & priv->msg_enable) \ 835 if (NETIF_MSG_##mlevel & (priv)->msg_enable) \
836 en_print(KERN_DEBUG, priv, format, ##arg); \ 836 en_print(KERN_DEBUG, priv, format, ##__VA_ARGS__); \
837} while (0) 837} while (0)
838#define en_warn(priv, format, arg...) \ 838#define en_warn(priv, format, ...) \
839 en_print(KERN_WARNING, priv, format, ##arg) 839 en_print(KERN_WARNING, priv, format, ##__VA_ARGS__)
840#define en_err(priv, format, arg...) \ 840#define en_err(priv, format, ...) \
841 en_print(KERN_ERR, priv, format, ##arg) 841 en_print(KERN_ERR, priv, format, ##__VA_ARGS__)
842#define en_info(priv, format, arg...) \ 842#define en_info(priv, format, ...) \
843 en_print(KERN_INFO, priv, format, ## arg) 843 en_print(KERN_INFO, priv, format, ##__VA_ARGS__)
844 844
845#define mlx4_err(mdev, format, arg...) \ 845#define mlx4_err(mdev, format, ...) \
846 pr_err("%s %s: " format, DRV_NAME, \ 846 pr_err(DRV_NAME " %s: " format, \
847 dev_name(&mdev->pdev->dev), ##arg) 847 dev_name(&(mdev)->pdev->dev), ##__VA_ARGS__)
848#define mlx4_info(mdev, format, arg...) \ 848#define mlx4_info(mdev, format, ...) \
849 pr_info("%s %s: " format, DRV_NAME, \ 849 pr_info(DRV_NAME " %s: " format, \
850 dev_name(&mdev->pdev->dev), ##arg) 850 dev_name(&(mdev)->pdev->dev), ##__VA_ARGS__)
851#define mlx4_warn(mdev, format, arg...) \ 851#define mlx4_warn(mdev, format, ...) \
852 pr_warning("%s %s: " format, DRV_NAME, \ 852 pr_warn(DRV_NAME " %s: " format, \
853 dev_name(&mdev->pdev->dev), ##arg) 853 dev_name(&(mdev)->pdev->dev), ##__VA_ARGS__)
854 854
855#endif 855#endif