summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_print.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2019-10-01 16:06:14 +0200
committerJani Nikula <jani.nikula@intel.com>2019-10-02 15:28:55 +0200
commitf0a8f533adc202f7dc83961c85187794eaed9cec (patch)
tree5600de76c2e33d6f637a69a56f92c834676d9894 /drivers/gpu/drm/drm_print.c
parentdrm/print: move drm_debug variable to drm_print.[ch] (diff)
downloadlinux-f0a8f533adc202f7dc83961c85187794eaed9cec.tar.xz
linux-f0a8f533adc202f7dc83961c85187794eaed9cec.zip
drm/print: add drm_debug_enabled()
Add helper to check if a drm debug category is enabled. Convert drm core to use it. No functional changes. v2: Move unlikely() to drm_debug_enabled() (Eric) v3: Keep unlikely() when combined with other conditions (Eric) Cc: Eric Engestrom <eric@engestrom.ch> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191001140614.26909-1-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_print.c')
-rw-r--r--drivers/gpu/drm/drm_print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index 1ade3a917c10..9a25d73c155c 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -262,7 +262,7 @@ void drm_dev_dbg(const struct device *dev, unsigned int category,
struct va_format vaf;
va_list args;
- if (!(drm_debug & category))
+ if (!drm_debug_enabled(category))
return;
va_start(args, format);
@@ -285,7 +285,7 @@ void drm_dbg(unsigned int category, const char *format, ...)
struct va_format vaf;
va_list args;
- if (!(drm_debug & category))
+ if (!drm_debug_enabled(category))
return;
va_start(args, format);