Commit 7c7d5b1c authored by Jani Nikula's avatar Jani Nikula

Merge tag 'topic/drm-warn-2020-01-22' of...

Merge tag 'topic/drm-warn-2020-01-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next-queued

struct drm_device based drm_WARN* macros
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87eevrecnf.fsf@intel.com
parents 5424f5d7 dc1a73e5
...@@ -553,4 +553,33 @@ void __drm_err(const char *format, ...); ...@@ -553,4 +553,33 @@ void __drm_err(const char *format, ...);
#define DRM_DEBUG_PRIME_RATELIMITED(fmt, ...) \ #define DRM_DEBUG_PRIME_RATELIMITED(fmt, ...) \
DRM_DEV_DEBUG_PRIME_RATELIMITED(NULL, fmt, ##__VA_ARGS__) DRM_DEV_DEBUG_PRIME_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
/*
* struct drm_device based WARNs
*
* drm_WARN*() acts like WARN*(), but with the key difference of
* using device specific information so that we know from which device
* warning is originating from.
*
* Prefer drm_device based drm_WARN* over regular WARN*
*/
/* Helper for struct drm_device based WARNs */
#define drm_WARN(drm, condition, format, arg...) \
WARN(condition, "%s %s: " format, \
dev_driver_string((drm)->dev), \
dev_name((drm)->dev), ## arg)
#define drm_WARN_ONCE(drm, condition, format, arg...) \
WARN_ONCE(condition, "%s %s: " format, \
dev_driver_string((drm)->dev), \
dev_name((drm)->dev), ## arg)
#define drm_WARN_ON(drm, x) \
drm_WARN((drm), (x), "%s", \
"drm_WARN_ON(" __stringify(x) ")")
#define drm_WARN_ON_ONCE(drm, x) \
drm_WARN_ONCE((drm), (x), "%s", \
"drm_WARN_ON_ONCE(" __stringify(x) ")")
#endif /* DRM_PRINT_H_ */ #endif /* DRM_PRINT_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment