[PATCH] drm/print: Delete a few unused shouting macros
Sam Ravnborg
sam at ravnborg.org
Fri Feb 14 14:54:49 UTC 2020
Hi Daniel.
On Fri, Feb 14, 2020 at 10:04:28AM +0100, Daniel Vetter wrote:
> We want to go over to the new lowercase ones, encourage that a bit
> more.
Thanks for doing this, one item less on my TODO list now.
>
> Cc: Jani Nikula <jani.nikula at intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> drivers/gpu/drm/drm_managed.c | 21 +++++++++++++++++++++
Ups...
> include/drm/drm_print.h | 26 --------------------------
This part is:
Reviewed-by: Sam Ravnborg <sam at ravnborg.org>
Could you squash in this patch too?
Is simplifies the RATELIMITED stuff and limit it to what is used.
I can send a separate patch for this if you prefer.
Sam
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index fd6ba2532f50..ca7cee8e728a 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -383,25 +383,6 @@ void drm_dev_dbg(const struct device *dev, enum drm_debug_category category,
#define DRM_DEV_DEBUG_KMS(dev, fmt, ...) \
drm_dev_dbg(dev, DRM_UT_KMS, fmt, ##__VA_ARGS__)
-#define _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, category, fmt, ...) \
-({ \
- static DEFINE_RATELIMIT_STATE(_rs, \
- DEFAULT_RATELIMIT_INTERVAL, \
- DEFAULT_RATELIMIT_BURST); \
- if (__ratelimit(&_rs)) \
- drm_dev_dbg(dev, category, fmt, ##__VA_ARGS__); \
-})
-
-/**
- * Rate limited debug output. Like DRM_DEBUG() but won't flood the log.
- *
- * @dev: device pointer
- * @fmt: printf() like format string.
- */
-#define DRM_DEV_DEBUG_KMS_RATELIMITED(dev, fmt, ...) \
- _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, DRM_UT_KMS, \
- fmt, ##__VA_ARGS__)
-
/*
* struct drm_device based logging
*
@@ -525,7 +506,13 @@ void __drm_err(const char *format, ...);
#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) \
- DRM_DEV_DEBUG_KMS_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
+({ \
+ static DEFINE_RATELIMIT_STATE(_rs, \
+ DEFAULT_RATELIMIT_INTERVAL, \
+ DEFAULT_RATELIMIT_BURST); \
+ if (__ratelimit(&_rs)) \
+ drm_dev_dbg(NULL, DRM_UT_KMS, fmt, ##__VA_ARGS__); \
+})
/*
* struct drm_device based WARNs
More information about the dri-devel
mailing list