diff options
author | Jani Nikula <jani.nikula@intel.com> | 2019-10-28 11:38:18 +0100 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2019-11-14 13:08:41 +0100 |
commit | 9f0ac028410fe8ad3aa2a9d82fa1cfc9ebba70ac (patch) | |
tree | 2c61ed05cc2df8af20cc73d90115b93b4ac123b7 /include | |
parent | drm/amdgpu: use drm_debug_enabled() to check for debug categories (diff) | |
download | linux-9f0ac028410fe8ad3aa2a9d82fa1cfc9ebba70ac.tar.xz linux-9f0ac028410fe8ad3aa2a9d82fa1cfc9ebba70ac.zip |
drm/print: rename drm_debug to __drm_debug to discourage use
drm_debug_enabled() is the way to check. __drm_debug is now reserved for
drm print code only. No functional changes.
v2: Rebase on move unlikely() to drm_debug_enabled()
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Sean Paul <sean@poorly.run>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/840ff7292d1a39512bac2fcb1f45de9d50694bf1.1572258936.git.jani.nikula@intel.com
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_print.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 5b8049992c24..77fef2c7e312 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -34,7 +34,8 @@ #include <drm/drm.h> -extern unsigned int drm_debug; +/* Do *not* use outside of drm_print.[ch]! */ +extern unsigned int __drm_debug; /** * DOC: print @@ -295,7 +296,7 @@ static inline struct drm_printer drm_err_printer(const char *prefix) static inline bool drm_debug_enabled(unsigned int category) { - return unlikely(drm_debug & category); + return unlikely(__drm_debug & category); } __printf(3, 4) |