All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: fix warning in SVM debug statement
@ 2023-03-06 22:43 Alex Deucher
  2023-03-07  7:48 ` Quan, Evan
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher @ 2023-03-06 22:43 UTC (permalink / raw
  To: amd-gfx; +Cc: Alex Deucher

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@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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] drm/amdkfd: fix warning in SVM debug statement
  2023-03-06 22:43 [PATCH] drm/amdkfd: fix warning in SVM debug statement Alex Deucher
@ 2023-03-07  7:48 ` Quan, Evan
  0 siblings, 0 replies; 2+ messages in thread
From: Quan, Evan @ 2023-03-07  7:48 UTC (permalink / raw
  To: Deucher, Alexander, amd-gfx@lists.freedesktop.org; +Cc: Deucher, Alexander

[AMD Official Use Only - General]

Reviewed-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: Tuesday, March 7, 2023 6:43 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: [PATCH] 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,
>       |         ^~~~~~~~
> 
> Fixes: b752374fdf3a ("drm/amdkfd: Fix BO offset for multi-VMA page
> migration")
> Signed-off-by: Alex Deucher <alexander.deucher@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-07  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-06 22:43 [PATCH] drm/amdkfd: fix warning in SVM debug statement Alex Deucher
2023-03-07  7:48 ` Quan, Evan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.