drm/i915/perf: Fix compiler warning for string truncation
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Feb 2018 10:24:02 +0000 (10:24 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 13 Feb 2018 07:34:50 +0000 (23:34 -0800)
commit75b0e73023ef7994348d619e9adadab0e96bb195
treeeeb75370d7afe3a4ee56bf5a6baa24be47536ecf
parent7928b2cbe55b2a410a0f5c1f154610059c57b1b2
drm/i915/perf: Fix compiler warning for string truncation

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

v2: strlcpy

Fixes: 4407eaa9b0cc ("drm/i915/perf: add support for Coffeelake GT3")
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-1-chris@chris-wilson.co.uk
(cherry picked from commit 43df81d324cdd7056ad0ce3df709aff8dce856b7)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/i915_oa_cflgt3.c