diff options
| author | Felix Kuehling <[email protected]> | 2020-05-22 19:57:51 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-05-28 21:46:20 +0000 |
| commit | 83a13ef5902aeedbd84ab282c835059c2cae5783 (patch) | |
| tree | fad7120054c10bbb3d7d41edc5a3272b916a43b4 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
| parent | drm/amd/amdgpu: Fix the CGCG setting is overwritten for SRIOV. (diff) | |
| download | kernel-83a13ef5902aeedbd84ab282c835059c2cae5783.tar.gz kernel-83a13ef5902aeedbd84ab282c835059c2cae5783.zip | |
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
