aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2020-05-22 15:57:51 -0400
committerAlex Deucher <[email protected]>2020-05-28 17:46:20 -0400
commit83a13ef5902aeedbd84ab282c835059c2cae5783 (patch)
treefad7120054c10bbb3d7d41edc5a3272b916a43b4 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
parentb0f8a6d5ef0e5d37176e4ce8e297bfffb7438503 (diff)
drm/amdkfd: Fix GCC 10 compiler warning
GCC 10 was complaining about how we append data to a buffer using snprintf: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function ‘perf_show’: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:214:3: warning: ‘snprintf’ argument 4 overlaps destination object ‘buf’ [-Wrestrict] 214 | snprintf(buffer, PAGE_SIZE, "%s"fmt, buffer, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This patch fixes the warnings and makes the sysfs code more efficient by remembering the offset in the buffer between append operations. Signed-off-by: Felix Kuehling <[email protected]> Acked-by: Aaron Liu <[email protected]> Tested-by: Aaron Liu <[email protected]> Reviewed-by: Amber Lin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
0 files changed, 0 insertions, 0 deletions