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
This commit is contained in:
@@ -783,7 +783,7 @@ static int mipi_dbi_spi1e_transfer(struct mipi_dbi *dbi, int dc,
|
||||
int i, ret;
|
||||
u8 *dst;
|
||||
|
||||
if (drm_debug & DRM_UT_DRIVER)
|
||||
if (drm_debug_enabled(DRM_UT_DRIVER))
|
||||
pr_debug("[drm:%s] dc=%d, max_chunk=%zu, transfers:\n",
|
||||
__func__, dc, max_chunk);
|
||||
|
||||
@@ -907,7 +907,7 @@ static int mipi_dbi_spi1_transfer(struct mipi_dbi *dbi, int dc,
|
||||
max_chunk = dbi->tx_buf9_len;
|
||||
dst16 = dbi->tx_buf9;
|
||||
|
||||
if (drm_debug & DRM_UT_DRIVER)
|
||||
if (drm_debug_enabled(DRM_UT_DRIVER))
|
||||
pr_debug("[drm:%s] dc=%d, max_chunk=%zu, transfers:\n",
|
||||
__func__, dc, max_chunk);
|
||||
|
||||
|
Reference in New Issue
Block a user