Skip to content

drm/amdgpu: Replace snprintf() with sysfs_emit

Sumera Priyadarsini amd-gfx dri-devel linux-media lkml outreachy 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c+1 -10 replies
2/5gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+4 -40 replies
3/5gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c+2 -20 replies
4/5gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c+1 -12 replies
5/5gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit

Using snprintf() for show() methods holds the risk of buffer overrun as snprintf() does not know the PAGE_SIZE maximum of the temporary buffer used to output sysfs content.

This patchset is a series of Coccinelle cleanups across the staging directory to convert snprintf with scnprintf in the relevant files.

Sumera Priyadarsini (5):
gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()
gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()
gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()
gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()
gpu: drm: amdgpu: Replace snprintf() with sysfs_emit()

 drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c   | 8 ++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c  | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c      | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
Signature · 1 line
2.25.1