Hi Nirmoy On Tue, Jan 17, 2023 at 12:53:49PM +0100, Nirmoy Das wrote: > Add a function for ratelimitted debug print. > > Cc: Maarten Lankhorst <[email protected]> > Cc: Maxime Ripard <[email protected]> > Cc: Thomas Zimmermann <[email protected]> > Cc: David Airlie <[email protected]> > Cc: Daniel Vetter <[email protected]> > Reviewed-by: Matthew Auld <[email protected]> > Signed-off-by: Nirmoy Das <[email protected]>
Thanks for adding this. The patch as-is is: Reviewed-by: Sam Ravnborg <[email protected]> It would have been nice to start adding kernel-doc to the non-deprecated logging functions. But as everyone else is missing this, it is OK that we miss it here. A couple of nice follow-up patches would be to introduce a KMS variant and replace the only user of DRM_DEBUG_KMS_RATELIMITED with the new variant and remove the old one. And maybe even update the remaining *ERROR_RATELIMITED users to a new variant - and drop the deprecated ones. Sam > --- > include/drm/drm_print.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h > index a44fb7ef257f..1d839f507319 100644 > --- a/include/drm/drm_print.h > +++ b/include/drm/drm_print.h > @@ -602,6 +602,9 @@ void __drm_err(const char *format, ...); > drm_dev_printk(drm_ ? drm_->dev : NULL, KERN_DEBUG, fmt, ## > __VA_ARGS__); \ > }) > > +#define drm_dbg_ratelimited(drm, fmt, ...) \ > + __DRM_DEFINE_DBG_RATELIMITED(DRIVER, drm, fmt, ## __VA_ARGS__) > + > #define drm_dbg_kms_ratelimited(drm, fmt, ...) \ > __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__) > > -- > 2.39.0
