[PATCH] drm/amdkfd: fix warning in SVM debug statement

Alex Deucher alexander.deucher at amd.com
Mon Mar 6 22:43:13 UTC 2023


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,
      |         ^~~~~~~~

Fixes: b752374fdf3a ("drm/amdkfd: Fix BO offset for multi-VMA page migration")
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index ad109403b5cc..391da6acb3e5 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -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;
-- 
2.39.2



More information about the amd-gfx mailing list