[Public] Reviewed-by: Guchun Chen <[email protected]>
Regards, Guchun > -----Original Message----- > From: SHANMUGAM, SRINIVASAN <[email protected]> > Sent: Thursday, July 27, 2023 10:33 AM > To: Koenig, Christian <[email protected]>; Deucher, Alexander > <[email protected]>; Chen, Guchun <[email protected]> > Cc: [email protected]; SHANMUGAM, SRINIVASAN > <[email protected]> > Subject: [PATCH] drm/amdgpu: Fix printk_ratelimit() with > DRM_ERROR_RATELIMITED in 'amdgpu_cs_ioctl' > > Replaced printk_ratelimit() with its DRM equivalent to avoid flooding of > dmesg logs & hence fixes the following: > > WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to > printk_ratelimit > + if (printk_ratelimit()) > > Cc: Christian König <[email protected]> > Cc: Alex Deucher <[email protected]> > Signed-off-by: Srinivasan Shanmugam <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > index 040f4cb6ab2d..a3bae98c7803 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c > @@ -1430,8 +1430,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void > *data, struct drm_file *filp) > > r = amdgpu_cs_parser_init(&parser, adev, filp, data); > if (r) { > - if (printk_ratelimit()) > - DRM_ERROR("Failed to initialize parser %d!\n", r); > + DRM_ERROR_RATELIMITED("Failed to initialize parser %d!\n", > r); > return r; > } > > -- > 2.25.1
