aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorThomas Zimmermann <[email protected]>2020-10-21 12:12:41 +0000
committerThomas Zimmermann <[email protected]>2020-11-03 09:38:06 +0000
commit35bed3fa9ec58a5b5406c60f66faff86f00fa86b (patch)
tree8bdb5c4cde247bdca8f4f259d28444b8a2383427 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentdrm/panfrost: Remove unused variables in panfrost_job_close() (diff)
downloadkernel-35bed3fa9ec58a5b5406c60f66faff86f00fa86b.tar.gz
kernel-35bed3fa9ec58a5b5406c60f66faff86f00fa86b.zip
drivers/video: Fix -Wstringop-truncation in hdmi.c
Trying to copy into the string fields with strncpy() gives a warning from gcc. Both fields are part of a packed HDMI header and do not require a terminating \0 character. ../drivers/video/hdmi.c: In function 'hdmi_spd_infoframe_init': ../drivers/video/hdmi.c:230:2: warning: 'strncpy' specified bound 8 equals destination size [-Wstringop-truncation] 230 | strncpy(frame->vendor, vendor, sizeof(frame->vendor)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/video/hdmi.c:231:2: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation] 231 | strncpy(frame->product, product, sizeof(frame->product)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Just use memcpy() instead. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions