drm/amdkfd: fix warning in SVM debug statement
Subsystems (3)
Alex Deucher
maintainerPATCH 1/1 drm/amdkfd: fix warning in SVM debug statement
Print a long long value.
In file included from ./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_object.h:32,
from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:29:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c: In function ‘svm_migrate_copy_to_vram’:
./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:35:21: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
35 | #define pr_fmt(fmt) "amdgpu: " fmt
| ^~~~~~~~~~
./include/linux/dynamic_debug.h:223:29: note: in expansion of macro ‘pr_fmt’
223 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
./include/linux/dynamic_debug.h:247:9: note: in expansion of macro ‘__dynamic_func_call_cls’
247 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:249:9: note: in expansion of macro ‘_dynamic_func_call_cls’
249 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:268:9: note: in expansion of macro ‘_dynamic_func_call’
268 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
./include/linux/printk.h:581:9: note: in expansion of macro ‘dynamic_pr_debug’
581 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:302:9: note: in expansion of macro ‘pr_debug’
302 | pr_debug("svms 0x%p [0x%lx 0x%lx 0x%lx]\n", prange->svms, prange->start,
| ^~~~~~~~--- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +1 -1
@@ -299,7 +299,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,uint64_t i, j;int r; -pr_debug ("svms 0x%p [0x%lx 0x%lx 0x%lx]\n" , prange->svms, prange->start, +pr_debug ("svms 0x%p [0x%lx 0x%lx 0x%llx]\n" , prange->svms, prange->start, prange->last, ttm_res_offset); src = scratch;
Signature · 1 line
2.39.2
[AMD Official Use Only - General]
Quoted 74 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, March 7, 2023 6:43 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdkfd: fix warning in SVM debug statementPrint a long long value.
In file included
from./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_object.h:32,from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:29:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c: In function ‘svm_migrate_copy_to_vram’:./drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:35:21: warning:
format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
35 | #definepr_fmt(fmt)"amdgpu: " fmt| ^~~~~~~~~~ ./include/linux/dynamic_debug.h:223:29: note: in expansion of macro ‘pr_fmt’ 223 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~
./include/linux/dynamic_debug.h:247:9: note: in expansion of macro ‘__dynamic_func_call_cls’
247 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func,
##__VA_ARGS__)| ^~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:249:9: note: in expansion of macro ‘_dynamic_func_call_cls’
249 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func,
##__VA_ARGS__)| ^~~~~~~~~~~~~~~~~~~~~~ ./include/linux/dynamic_debug.h:268:9: note: in expansion of macro ‘_dynamic_func_call’ 268 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ^~~~~~~~~~~~~~~~~~ ./include/linux/printk.h:581:9: note: in expansion of macro ‘dynamic_pr_debug’ 581 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:302:9: note: in expansion of macro ‘pr_debug’
302 | pr_debug("svms 0x%p [0x%lx 0x%lx 0x%lx]\n",prange->svms,prange->start,| ^~~~~~~~Fixes b752374fdf3a ("drm/amdkfd: Fix BO offset for multi-VMA pagemigration")
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +1
-1@@ -299,7 +299,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange, uint64_t i, j;int r; - pr_debug("svms 0x%p [0x%lx 0x%lx 0x%lx]\n", prange->svms, prange->start, + pr_debug("svms 0x%p [0x%lx 0x%lx 0x%llx]\n", prange->svms, prange->start,drivers/gpu/drm/amd/amdkfd/kfd_migrate.c +0
-1prange->last, ttm_res_offset); src = scratch; --2.39.2