diff options
| author | Srinivasan Shanmugam <[email protected]> | 2023-07-27 02:32:46 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-08-30 19:51:17 +0000 |
| commit | 8254e05c8297e31e398911dffc3d7f37602d87b2 (patch) | |
| tree | b475a7ef4d519aadef278f5cc966c271ee2ebfce /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | Revert "Revert "drm/amd/display: Implement zpos property"" (diff) | |
| download | kernel-8254e05c8297e31e398911dffc3d7f37602d87b2.tar.gz kernel-8254e05c8297e31e398911dffc3d7f37602d87b2.zip | |
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]>
Reviewed-by: Guchun Chen <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 49dd9aa8da70..fe78796f0407 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1402,8 +1402,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; } |
