Re: [Intel-gfx] [PATCH 1/2] drm/i915/perf: Fix compiler warning for string truncation

2018-02-08 Thread Chris Wilson
Quoting Lionel Landwerlin (2018-02-08 10:18:05) > Arg... I don't know how this happened. > I thought we agreed upon using strlcpy()? The others are using sizeof() + strlcpy. I missed the strlcpy difference. char uuid[sizeof(test_config.uuid)] = "..."; memcpy(test_config.uuid, uuid, sizeof(uuid));

Re: [Intel-gfx] [PATCH 1/2] drm/i915/perf: Fix compiler warning for string truncation

2018-02-08 Thread Lionel Landwerlin
Arg... I don't know how this happened. I thought we agreed upon using strlcpy()? On 08/02/18 10:09, Chris Wilson wrote: 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 t

[Intel-gfx] [PATCH 1/2] drm/i915/perf: Fix compiler warning for string truncation

2018-02-08 Thread Chris Wilson
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] Fixes: 4407eaa9b0cc ("drm/