aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorSrinivasan Shanmugam <[email protected]>2024-03-22 07:02:47 +0000
committerAlex Deucher <[email protected]>2024-03-22 19:56:28 +0000
commit730dd50f84b51664e1c13258c21413e49f93394d (patch)
tree1ab49d80508a0cf360c8f275aa00fbbfeb53f6e4 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentdrm/amdgpu: simplify convert_error_address interface for UMC v12 (diff)
downloadkernel-730dd50f84b51664e1c13258c21413e49f93394d.tar.gz
kernel-730dd50f84b51664e1c13258c21413e49f93394d.zip
drm/amdgpu: Fix truncation in smu_v11_0_init_microcode
Reducing the size of ucode_prefix to 25 in the smu_v11_0_init_microcode function. we ensure that fw_name can accommodate the maximum possible string size Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/smu_v11_0.c: In function ‘smu_v11_0_init_microcode’: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/smu_v11_0.c:110:54: warning: ‘.bin’ directive output may be truncated writing 4 bytes into a region of size between 0 and 29 [-Wformat-truncation=] 110 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix); | ^~~~ drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/smu_v11_0.c:110:9: note: ‘snprintf’ output between 12 and 41 bytes into a destination of size 36 110 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s.bin", ucode_prefix); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Suggested-by: Lijo Lazar <[email protected]> Signed-off-by: Srinivasan Shanmugam <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions