Skip to contentSkip to conversation

drm/amdkfd: fix wanting in print statement

PATCH In review Alex Deucher 2 participants 5 messages Sep 21, 2020 – Sep 22, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: fix wanting in print statement

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function ‘kfd_create_crat_image_virtual’:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |            ^~~~~~~~~~~~~~~~~

./include/linux/printk.h:297:21: note: in definition of macro ‘pr_fmt’
297 | #define pr_fmt(fmt) fmt
| ^~~
./include/linux/dynamic_debug.h:143:2: note: in expansion of macro ‘__dynamic_func_call’

  143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:153:2: note: in expansion of macro ‘_dynamic_func_call’
  153 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/printk.h:420:2: note: in expansion of macro ‘dynamic_pr_debug’
  420 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:3: note: in expansion of macro ‘pr_debug’
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |   ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:27: note: format string is defined here
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |                          ~^
      |                           |
      |                           int
      |                          %ld
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -1
index c50e9f634d6c..d2981524dba0 100644
@@ -1388,7 +1388,7 @@ int kfd_create_crat_image_virtual(void **crat_image, size_t *size,
 		if (!pcrat_image)
 			return -ENOMEM;
 		*size = dyn_size;
-		pr_debug("CRAT size is %d", dyn_size);
+		pr_debug("CRAT size is %ld", dyn_size);
 		ret = kfd_create_vcrat_image_cpu(pcrat_image, size);
 		break;
 	case COMPUTE_UNIT_GPU:
Signature · 6 lines
2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

"warning" in print statement. Fixed locally.

Quoted 46 lines · Alex Deucher

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function ‘kfd_create_crat_image_virtual’:
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]

 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |            ^~~~~~~~~~~~~~~~~

./include/linux/printk.h:297:21: note: in definition of macro ‘pr_fmt’
297 | #define pr_fmt(fmt) fmt
| ^~~
./include/linux/dynamic_debug.h:143:2: note: in expansion of macro ‘__dynamic_func_call’

  143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:153:2: note: in expansion of macro ‘_dynamic_func_call’
  153 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/printk.h:420:2: note: in expansion of macro ‘dynamic_pr_debug’
  420 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:3: note: in expansion of macro ‘pr_debug’
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |   ^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:27: note: format string is defined here
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |                          ~^
      |                           |
      |                           int
      |                          %ld
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -2
index c50e9f634d6c..d2981524dba0 100644
@@ -1388,7 +1388,7 @@ int kfd_create_crat_image_virtual(void **crat_image, size_t *size,
                if (!pcrat_image)
                        return -ENOMEM;
                *size = dyn_size;
-               pr_debug("CRAT size is %d", dyn_size);
+               pr_debug("CRAT size is %ld", dyn_size);
                ret = kfd_create_vcrat_image_cpu(pcrat_image, size);
                break;
        case COMPUTE_UNIT_GPU:
--
Quoted 2 lines

2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw

[AMD Public Use]

Thanks Alex, sorry about that!

Kent

Quoted 67 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, September 21, 2020 5:33 PM
To: amd-gfx list <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: fix wanting in print statement

"warning" in print statement. Fixed locally.

Quoted 2 lines · Alex Deucher

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function

‘kfd_create_crat_image_virtual’:

Quoted 1 line

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:12: warning: format ‘%d’

expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [- Wformat=]

Quoted 6 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |            ^~~~~~~~~~~~~~~~~

./include/linux/printk.h:297:21: note: in definition of macro ‘pr_fmt’
297 | #define pr_fmt(fmt) fmt
| ^~~
./include/linux/dynamic_debug.h:143:2: note: in expansion of macro

‘__dynamic_func_call’

Quoted 3 lines
  143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~

./include/linux/dynamic_debug.h:153:2: note: in expansion of macro

‘_dynamic_func_call’

Quoted 6 lines
  153 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/printk.h:420:2: note: in expansion of macro ‘dynamic_pr_debug’
  420 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:3: note: in expansion of macro

‘pr_debug’

Quoted 3 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |   ^~~~~~~~

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:27: note: format string is

defined here

Quoted 6 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |                          ~^
      |                           |
      |                           int
      |                          %ld

Review

Quoted 6 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c

drivers/gpu/drm/amd/amdkfd/kfd_crat.c int kfd_create_crat_image_virtual(void **crat_image, size_t

Quoted 4 lines

index c50e9f634d6c..d2981524dba0 100644

drivers/gpu/drm/amd/amdkfd/kfd_crat.c +0 -0
@@ -1388,7 +1388,7 @@ int kfd_create_crat_image_virtual(void **crat_image, size_t

*size,

Quoted 11 lines
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -2
                if (!pcrat_image)
                        return -ENOMEM;
                *size = dyn_size;
-               pr_debug("CRAT size is %d", dyn_size);
+               pr_debug("CRAT size is %ld", dyn_size);
                ret = kfd_create_vcrat_image_cpu(pcrat_image, size);
                break;
        case COMPUTE_UNIT_GPU:
--

2.25.4

Quoted 8 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.or
g%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Ckent.russell%40amd.com%7C611fc25735e041fbd3d708d85e75 e355%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637363207721737766&amp; sdata=BvMRCPYK0WuXTJAotNMFfG7lBn2t4dYogDUoRZQrTdA%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw

Can I get an RB?

Quoted 82 lines · Kent

[AMD Public Use]

Thanks Alex, sorry about that!

Kent

Quoted 75 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, September 21, 2020 5:33 PM
To: amd-gfx list <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: fix wanting in print statement

"warning" in print statement. Fixed locally.

Quoted 2 lines · Alex Deucher

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function

‘kfd_create_crat_image_virtual’:

Quoted 1 line

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:12: warning: format ‘%d’

expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [- Wformat=]

Quoted 6 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |            ^~~~~~~~~~~~~~~~~

./include/linux/printk.h:297:21: note: in definition of macro ‘pr_fmt’
297 | #define pr_fmt(fmt) fmt
| ^~~
./include/linux/dynamic_debug.h:143:2: note: in expansion of macro

‘__dynamic_func_call’

Quoted 3 lines
  143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~

./include/linux/dynamic_debug.h:153:2: note: in expansion of macro

‘_dynamic_func_call’

Quoted 6 lines
  153 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/printk.h:420:2: note: in expansion of macro ‘dynamic_pr_debug’
  420 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:3: note: in expansion of macro

‘pr_debug’

Quoted 3 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |   ^~~~~~~~

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:27: note: format string is

defined here

Quoted 6 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |                          ~^
      |                           |
      |                           int
      |                          %ld

Review

Quoted 6 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c

drivers/gpu/drm/amd/amdkfd/kfd_crat.c int kfd_create_crat_image_virtual(void **crat_image, size_t

Quoted 4 lines

index c50e9f634d6c..d2981524dba0 100644

drivers/gpu/drm/amd/amdkfd/kfd_crat.c +0 -0
@@ -1388,7 +1388,7 @@ int kfd_create_crat_image_virtual(void **crat_image, size_t

*size,

Quoted 11 lines
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -2
                if (!pcrat_image)
                        return -ENOMEM;
                *size = dyn_size;
-               pr_debug("CRAT size is %d", dyn_size);
+               pr_debug("CRAT size is %ld", dyn_size);
                ret = kfd_create_vcrat_image_cpu(pcrat_image, size);
                break;
        case COMPUTE_UNIT_GPU:
--

2.25.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.or
g%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Ckent.russell%40amd.com%7C611fc25735e041fbd3d708d85e75 e355%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637363207721737766&amp; sdata=BvMRCPYK0WuXTJAotNMFfG7lBn2t4dYogDUoRZQrTdA%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#4 lore raw

[AMD Public Use]

Definitely. Reviewed-by: Kent Russell <[email protected]> .

Quoted 91 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Tuesday, September 22, 2020 9:59 AM
To: Russell, Kent <[email protected]>
Cc: amd-gfx list <[email protected]>; Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: fix wanting in print statement

Can I get an RB?

Quoted 22 lines · Kent

[AMD Public Use]

Thanks Alex, sorry about that!

Kent

Quoted 15 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, September 21, 2020 5:33 PM
To: amd-gfx list <[email protected]>
Cc: Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: fix wanting in print statement

"warning" in print statement. Fixed locally.

Quoted 2 lines · Alex Deucher

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c: In function

‘kfd_create_crat_image_virtual’:

Quoted 1 line

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:12: warning: format ‘%d’

expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’}

[-

Quoted 11 lines
Quoted 11 lines

Wformat=]

Quoted 6 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |            ^~~~~~~~~~~~~~~~~

./include/linux/printk.h:297:21: note: in definition of macro ‘pr_fmt’
297 | #define pr_fmt(fmt) fmt
| ^~~
./include/linux/dynamic_debug.h:143:2: note: in expansion of macro

‘__dynamic_func_call’

Quoted 3 lines
  143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~

./include/linux/dynamic_debug.h:153:2: note: in expansion of macro

Quoted 7 lines
Quoted 7 lines

‘_dynamic_func_call’

Quoted 6 lines
  153 |  _dynamic_func_call(fmt, __dynamic_pr_debug,  \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/printk.h:420:2: note: in expansion of macro ‘dynamic_pr_debug’
  420 |  dynamic_pr_debug(fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:3: note: in expansion of

macro

Quoted 34 lines
Quoted 34 lines

‘pr_debug’

Quoted 3 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |   ^~~~~~~~

drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_crat.c:1391:27: note: format string is

defined here

Quoted 6 lines
 1391 |   pr_debug("CRAT size is %d", dyn_size);
      |                          ~^
      |                           |
      |                           int
      |                          %ld

Review

Quoted 6 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c

drivers/gpu/drm/amd/amdkfd/kfd_crat.c int kfd_create_crat_image_virtual(void **crat_image, size_t

Quoted 4 lines

index c50e9f634d6c..d2981524dba0 100644

drivers/gpu/drm/amd/amdkfd/kfd_crat.c +0 -0
@@ -1388,7 +1388,7 @@ int kfd_create_crat_image_virtual(void **crat_image, size_t

*size,

Quoted 11 lines
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -2
                if (!pcrat_image)
                        return -ENOMEM;
                *size = dyn_size;
-               pr_debug("CRAT size is %d", dyn_size);
+               pr_debug("CRAT size is %ld", dyn_size);
                ret = kfd_create_vcrat_image_cpu(pcrat_image, size);
                break;
        case COMPUTE_UNIT_GPU:
--

2.25.4

Quoted 4 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]

Quoted 7 lines

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.or

Quoted 2 lines
Quoted 2 lines

g%2Fmailman%2Flistinfo%2Famd-

gfx&amp;data=02%7C01%7Ckent.russell%40amd.com%7C611fc25735e041fbd3d708d85e75

Quoted 1 line
Quoted 1 line

e355%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637363207721737766&amp;

Quoted 1 line
Quoted 1 line

sdata=BvMRCPYK0WuXTJAotNMFfG7lBn2t4dYogDUoRZQrTdA%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx