Author: hselasky Date: Mon Mar 26 20:52:02 2018 New Revision: 331584 URL: https://svnweb.freebsd.org/changeset/base/331584
Log: MFC r330650: Use device_printf() instead of printf() when printing warnings and errors to dmesg(8) in mlx5core. Submitted by: Matthew Finlay <[email protected]> Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Mon Mar 26 20:50:28 2018 (r331583) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_core.h Mon Mar 26 20:52:02 2018 (r331584) @@ -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 { _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
