drm/print: add DRM_DEV_WARN macro
Subsystems (2)
PATCH 1/1 drm/print: add DRM_DEV_WARN macro
Add the DRM_DEV_WARN helper macro for printing warnings that use device pointers in their log output format. DRM_DEV_WARN can replace the use of dev_warn in such cases.
--- include/drm/drm_print.h | 9 +++++++++ 1 file changed, 9 insertions(+)
include/drm/drm_print.h +9 -0
@@ -329,6 +329,15 @@ void drm_err(const char *format, ...);#define DRM_WARN_ONCE (fmt, ...) \ _DRM_PRINTK(_once, WARNING, fmt, ##__VA_ARGS__) +/** +* Warning output. +* +* @dev: device pointer +* @fmt: printf() like format string. +*/ +#define DRM_DEV_WARN (dev, fmt, ...) \ + drm_dev_printk(dev, KERN_WARNING, fmt, ##__VA_ARGS__) +/** * Error output. *
Signature · 1 line
2.17.1
Quoted 5 lines · Wambui Karuga
Add the
DRM_DEV_WARNhelper macro for printing warnings that use device pointers in their log output format.DRM_DEV_WARNcan replace the use ofdev_warnin such cases.Signed-off-by Wambui Karuga <[email protected]>
Can you pls include this in the patch to add the first user with rockchip? Otherwise always a bit awkward when we add functions without callers.
lgtm otherwise.
-Daniel
Quoted 27 lines
--- include/drm/drm_print.h | 9 +++++++++ 1 file changed, 9 insertions(+)include/drm/drm_print.h +9
-0@@ -329,6 +329,15 @@ void drm_err(const char *format, ...);#define DRM_WARN_ONCE (fmt, ...) \ _DRM_PRINTK(_once, WARNING, fmt, ##__VA_ARGS__) +/** +* Warning output. +* +* @dev: device pointer +* @fmt: printf() like format string. +*/ +#define DRM_DEV_WARN (dev, fmt, ...) \ + drm_dev_printk(dev, KERN_WARNING, fmt, ##__VA_ARGS__) +/** * Error output. * Signature · 1 line
2.17.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 10 lines · Daniel Vetter
Quoted 5 lines · Wambui Karuga
Add the
DRM_DEV_WARNhelper macro for printing warnings that use device pointers in their log output format.DRM_DEV_WARNcan replace the use ofdev_warnin such cases.Signed-off-by Wambui Karuga <[email protected]>Can you pls include this in the patch to add the first user with rockchip? Otherwise always a bit awkward when we add functions without callers.
Okay, I'll send that as well.
Thought it'd be better to get this accepted first.
wambui
Quoted 36 lines
lgtm otherwise.
-DanielQuoted 27 lines
--- include/drm/drm_print.h | 9 +++++++++ 1 file changed, 9 insertions(+)include/drm/drm_print.h +9
-1@@ -329,6 +329,15 @@ void drm_err(const char *format, ...);#define DRM_WARN_ONCE (fmt, ...) \ _DRM_PRINTK(_once, WARNING, fmt, ##__VA_ARGS__) +/** +* Warning output. +* +* @dev: device pointer +* @fmt: printf() like format string. +*/ +#define DRM_DEV_WARN (dev, fmt, ...) \ + drm_dev_printk(dev, KERN_WARNING, fmt, ##__VA_ARGS__) +/** * Error output. * -- 2.17.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch