svn commit: r330650 - head/sys/dev/mlx5/mlx5_core
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Mar 8 11:58:28 UTC 2018
Author: hselasky
Date: Thu Mar 8 11:58:27 2018
New Revision: 330650
URL: https://svnweb.freebsd.org/changeset/base/330650
Log:
Use device_printf() instead of printf() when printing warnings and errors
to dmesg(8) in mlx5core.
Submitted by: Matthew Finlay <matt at mellanox.com>
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/dev/mlx5/mlx5_core/mlx5_core.h
Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 11:40:39 2018 (r330649)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Thu Mar 8 11:58:27 2018 (r330650)
@@ -49,14 +49,14 @@ do { \
mlx5_core_dbg(dev, format, ##__VA_ARGS__); \
} while (0)
-#define mlx5_core_err(dev, format, ...) \
- printf("mlx5_core: ERR: ""%s:%s:%d:(pid %d): " format, \
- (dev)->priv.name, __func__, __LINE__, curthread->td_proc->p_pid, \
- ##__VA_ARGS__)
+#define mlx5_core_err(_dev, format, ...) \
+ device_printf((&(_dev)->pdev->dev)->bsddev, "ERR: ""%s:%d:(pid %d): " format, \
+ __func__, __LINE__, curthread->td_proc->p_pid, \
+ ##__VA_ARGS__)
-#define mlx5_core_warn(dev, format, ...) \
- printf("mlx5_core: WARN: ""%s:%s:%d:(pid %d): " format, \
- (dev)->priv.name, __func__, __LINE__, curthread->td_proc->p_pid, \
+#define mlx5_core_warn(_dev, format, ...) \
+ device_printf((&(_dev)->pdev->dev)->bsddev, "WARN: ""%s:%d:(pid %d): " format, \
+ __func__, __LINE__, curthread->td_proc->p_pid, \
##__VA_ARGS__)
enum {
More information about the svn-src-all
mailing list