[PATCH] drm/amdkfd: fix warnings in kfd_migrate.c
Xiaogang.Chen
xiaogang.chen at amd.com
Fri Mar 10 18:57:02 UTC 2023
From: Xiaogang Chen <xiaogang.chen at amd.com>
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c: In function ‘svm_migrate_copy_to_vram’:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:393:1: warning: label ‘out’ defined but not used [-Wunused-label]
393 | out:
| ^~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:525:29: note: format string is defined here
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:40:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
40 | #define dev_fmt(fmt) "kfd_migrate: " fmt
525 | dev_dbg(adev->dev, "fail %d to alloc vram\n", r);
Fixes: b0b7d79469d9 ("drm/amdkfd: Get prange->offset after svm_range_vram_node_new")
Signed-off-by: Xiaogang Chen <Xiaogang.Chen at amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
index 734b4eeb0f3e..6a7dd6574646 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
@@ -390,7 +390,7 @@ svm_migrate_copy_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
migrate->dst[i + 3] = 0;
}
#endif
-out:
+
return r;
}
@@ -522,7 +522,7 @@ svm_migrate_ram_to_vram(struct svm_range *prange, uint32_t best_loc,
r = svm_range_vram_node_new(adev, prange, true);
if (r) {
- dev_dbg(adev->dev, "fail %d to alloc vram\n", r);
+ dev_dbg(adev->dev, "fail %ld to alloc vram\n", r);
return r;
}
ttm_res_offset = prange->offset << PAGE_SHIFT;
--
2.25.1
More information about the amd-gfx
mailing list