aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
diff options
context:
space:
mode:
authorJustin Stitt <[email protected]>2023-09-19 04:45:31 +0000
committerRodrigo Vivi <[email protected]>2023-09-20 20:54:56 +0000
commit5642639bd4f772a09bc4cb05ac7ac9378c2c3f5e (patch)
tree925186a32325c57d8db598ac8d4a774285e7d447 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
parentdrm/i915/lrc: User PXP contexts requires runalone bit in lrc (diff)
downloadkernel-5642639bd4f772a09bc4cb05ac7ac9378c2c3f5e.tar.gz
kernel-5642639bd4f772a09bc4cb05ac7ac9378c2c3f5e.zip
drm/i915: refactor deprecated strncpy
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. `ctx` is zero allocated and as such strncpy's NUL-padding behavior was strictly a performance hit which is now resolved. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: [email protected] Signed-off-by: Justin Stitt <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
0 files changed, 0 insertions, 0 deletions