Date: Mon, 26 Mar 2018 20:52:02 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331584 - stable/11/sys/dev/mlx5/mlx5_core Message-ID: <201803262052.w2QKq2Dp029870@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <matt@mellanox.com> 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 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803262052.w2QKq2Dp029870>