summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_oa_cflgt3.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-02-08 10:24:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-02-08 11:16:48 +0000
commit43df81d324cdd7056ad0ce3df709aff8dce856b7 (patch)
treec82e3f7e0a0e657062fb8cc3812e27849b6b2373 /drivers/gpu/drm/i915/i915_oa_cflgt3.c
parentce1599a40da20b0e5e4175fe3ef647d2862cbf41 (diff)
downloadlinux-stable-43df81d324cdd7056ad0ce3df709aff8dce856b7.tar.gz
linux-stable-43df81d324cdd7056ad0ce3df709aff8dce856b7.tar.bz2
linux-stable-43df81d324cdd7056ad0ce3df709aff8dce856b7.zip
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_oa_cflgt3.c')
-rw-r--r--drivers/gpu/drm/i915/i915_oa_cflgt3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_oa_cflgt3.c b/drivers/gpu/drm/i915/i915_oa_cflgt3.c
index 42ff06fe54a3..792facdb6702 100644
--- a/drivers/gpu/drm/i915/i915_oa_cflgt3.c
+++ b/drivers/gpu/drm/i915/i915_oa_cflgt3.c
@@ -84,9 +84,9 @@ show_test_oa_id(struct device *kdev, struct device_attribute *attr, char *buf)
void
i915_perf_load_test_config_cflgt3(struct drm_i915_private *dev_priv)
{
- strncpy(dev_priv->perf.oa.test_config.uuid,
+ strlcpy(dev_priv->perf.oa.test_config.uuid,
"577e8e2c-3fa0-4875-8743-3538d585e3b0",
- UUID_STRING_LEN);
+ sizeof(dev_priv->perf.oa.test_config.uuid));
dev_priv->perf.oa.test_config.id = 1;
dev_priv->perf.oa.test_config.mux_regs = mux_config_test_oa;