From: Eli Cohen <e...@mellanox.com>

Improve the messages printed by the mlx5 macros to include the device
string. In addition, prefix names used by the macros with two underscores
to avoid possible name collisions.

Signed-off-by: Eli Cohen <e...@mellanox.com>
Signed-off-by: Or Gerlitz <ogerl...@mellanox.com>
---
 .../net/ethernet/mellanox/mlx5/core/mlx5_core.h    | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h 
b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index 566a704..30c0be7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -43,25 +43,25 @@
 
 extern int mlx5_core_debug_mask;
 
-#define mlx5_core_dbg(dev, format, ...)                                        
\
-       pr_debug("%s:%s:%d:(pid %d): " format,                          \
-                (dev)->priv.name, __func__, __LINE__, current->pid,    \
+#define mlx5_core_dbg(__dev, format, ...)                              \
+       dev_dbg(&(__dev)->pdev->dev, "%s:%s:%d:(pid %d): " format,      \
+                (__dev)->priv.name, __func__, __LINE__, current->pid,  \
                 ##__VA_ARGS__)
 
-#define mlx5_core_dbg_mask(dev, mask, format, ...)                     \
+#define mlx5_core_dbg_mask(__dev, mask, format, ...)                   \
 do {                                                                   \
        if ((mask) & mlx5_core_debug_mask)                              \
-               mlx5_core_dbg(dev, format, ##__VA_ARGS__);              \
+               mlx5_core_dbg(__dev, format, ##__VA_ARGS__);            \
 } while (0)
 
-#define mlx5_core_err(dev, format, ...)                                        
\
-       pr_err("%s:%s:%d:(pid %d): " format,                            \
-              (dev)->priv.name, __func__, __LINE__, current->pid,      \
+#define mlx5_core_err(__dev, format, ...)                              \
+       dev_err(&(__dev)->pdev->dev, "%s:%s:%d:(pid %d): " format,      \
+              (__dev)->priv.name, __func__, __LINE__, current->pid,    \
               ##__VA_ARGS__)
 
-#define mlx5_core_warn(dev, format, ...)                               \
-       pr_warn("%s:%s:%d:(pid %d): " format,                           \
-               (dev)->priv.name, __func__, __LINE__, current->pid,     \
+#define mlx5_core_warn(__dev, format, ...)                             \
+       dev_warn(&(__dev)->pdev->dev, "%s:%s:%d:(pid %d): " format,     \
+               (__dev)->priv.name, __func__, __LINE__, current->pid,   \
                ##__VA_ARGS__)
 
 enum {
-- 
2.3.7

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to