[PATCH 2/2] drm/amd/amdkfd: Fix build error with unmatched argument type

Qingqing Zhuo qingqing.zhuo at amd.com
Wed Mar 8 09:34:08 UTC 2023


[Why]
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:
error: format ‘%lx’ expects argument of type ‘long unsigned int’,
but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
   35 | #define pr_fmt(fmt) "amdgpu: " fmt
      |                     ^~~~~~~~~~

[How]
use %llx instead of %lx for ttm_res_offset.

Fixes: d5db9d377c021 ("drm/amdkfd: Fix BO offset for multi-VMA page migration")
Signed-off-by: Qingqing Zhuo <qingqing.zhuo at amd.com>

Cc: Xiaogang Chen <Xiaogang.Chen at amd.com>
Cc: Felix Kuehling <Felix.Kuehling 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 373cd7b0e1ca..fd54a00e7229 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -304,7 +304,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.34.1



More information about the amd-gfx mailing list