]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/perf: Fix compiler warning for string truncation
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Feb 2018 10:24:03 +0000 (10:24 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 13 Feb 2018 07:34:55 +0000 (23:34 -0800)
commita295c3c8a604351c0f4235895f43494a2cd80bea
tree4d3e8b0d69ec7d4525d74f6177949b9a47f44b77
parent27d8a6ea9d7a247eed8aed358410ade7bebf4058
drm/i915/perf: Fix compiler warning for string truncation

drivers/gpu/drm/i915/i915_oa_cnl.c: In function ‘i915_perf_load_test_config_cnl’:
drivers/gpu/drm/i915/i915_oa_cnl.c:99:2: error: ‘strncpy’ output truncated before terminating nul copying 36 bytes from a string of the same length [-Werror=stringop-truncation]

v2: strlcpy

Fixes: fd921e5ad471 ("drm/i915/perf: enable perf support on CNL")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180208102403.5587-2-chris@chris-wilson.co.uk
(cherry picked from commit 020580ff8edd50e64ae1bf47e560c61e5e2f29fc)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_oa_cnl.c