* [PATCH net-next] eth: fs_enet: fix print format for resource size
@ 2023-06-15 3:52 ` Jakub Kicinski
0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-06-15 3:52 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, Jakub Kicinski, Randy Dunlap,
pantelis.antoniou, linuxppc-dev
Randy forwarded report from Stephen that on PowerPC:
drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
| ~^ ~~~~~~~~~
| | |
| | resource_size_t {aka long long unsigned int}
| unsigned int
| %llx
Use the right print format.
Untested, I can't repro this warning myself. With or without
the patch mpc512x_defconfig builds just fine.
Link: https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: Randy Dunlap <rdunlap@infradead.org>
CC: pantelis.antoniou@gmail.com
CC: linuxppc-dev@lists.ozlabs.org
Targeting net-next as I can't repro this, and I don't
see recent changes which could cause this problem.
So maybe it's something in linux-next... ?
In any case res is a struct resource so patch shouldn't hurt.
---
drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
index d37d7a19a759..59a8f0bd0f5c 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
@@ -127,7 +127,7 @@ static int fs_enet_mdio_probe(struct platform_device *ofdev)
if (ret)
goto out_res;
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "%pap", &res.start);
fec->fecp = ioremap(res.start, resource_size(&res));
if (!fec->fecp) {
--
2.40.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next] eth: fs_enet: fix print format for resource size
@ 2023-06-15 3:52 ` Jakub Kicinski
0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-06-15 3:52 UTC (permalink / raw)
To: davem
Cc: netdev, Randy Dunlap, edumazet, Jakub Kicinski, pabeni, linuxppc-dev
Randy forwarded report from Stephen that on PowerPC:
drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
| ~^ ~~~~~~~~~
| | |
| | resource_size_t {aka long long unsigned int}
| unsigned int
| %llx
Use the right print format.
Untested, I can't repro this warning myself. With or without
the patch mpc512x_defconfig builds just fine.
Link: https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: Randy Dunlap <rdunlap@infradead.org>
CC: pantelis.antoniou@gmail.com
CC: linuxppc-dev@lists.ozlabs.org
Targeting net-next as I can't repro this, and I don't
see recent changes which could cause this problem.
So maybe it's something in linux-next... ?
In any case res is a struct resource so patch shouldn't hurt.
---
drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
index d37d7a19a759..59a8f0bd0f5c 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
@@ -127,7 +127,7 @@ static int fs_enet_mdio_probe(struct platform_device *ofdev)
if (ret)
goto out_res;
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "%pap", &res.start);
fec->fecp = ioremap(res.start, resource_size(&res));
if (!fec->fecp) {
--
2.40.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] eth: fs_enet: fix print format for resource size
2023-06-15 3:52 ` Jakub Kicinski
@ 2023-06-15 4:02 ` Randy Dunlap
-1 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2023-06-15 4:02 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, edumazet, pabeni, pantelis.antoniou, linuxppc-dev
On 6/14/23 20:52, Jakub Kicinski wrote:
> Randy forwarded report from Stephen that on PowerPC:
Stephen forwarded report from Randy?
netdev & pantelis were cc-ed...
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
> 130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> | ~^ ~~~~~~~~~
> | | |
> | | resource_size_t {aka long long unsigned int}
> | unsigned int
> | %llx
>
> Use the right print format.
>
> Untested, I can't repro this warning myself. With or without
> the patch mpc512x_defconfig builds just fine.
>
> Link: https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: Randy Dunlap <rdunlap@infradead.org>
> CC: pantelis.antoniou@gmail.com
> CC: linuxppc-dev@lists.ozlabs.org
I'm using gcc-12.2.0.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thanks.
>
> Targeting net-next as I can't repro this, and I don't
> see recent changes which could cause this problem.
> So maybe it's something in linux-next... ?
> In any case res is a struct resource so patch shouldn't hurt.
> ---
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
> index d37d7a19a759..59a8f0bd0f5c 100644
> --- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
> +++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
> @@ -127,7 +127,7 @@ static int fs_enet_mdio_probe(struct platform_device *ofdev)
> if (ret)
> goto out_res;
>
> - snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> + snprintf(new_bus->id, MII_BUS_ID_SIZE, "%pap", &res.start);
>
> fec->fecp = ioremap(res.start, resource_size(&res));
> if (!fec->fecp) {
--
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] eth: fs_enet: fix print format for resource size
@ 2023-06-15 4:02 ` Randy Dunlap
0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2023-06-15 4:02 UTC (permalink / raw)
To: Jakub Kicinski, davem; +Cc: netdev, edumazet, pabeni, linuxppc-dev
On 6/14/23 20:52, Jakub Kicinski wrote:
> Randy forwarded report from Stephen that on PowerPC:
Stephen forwarded report from Randy?
netdev & pantelis were cc-ed...
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
> 130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> | ~^ ~~~~~~~~~
> | | |
> | | resource_size_t {aka long long unsigned int}
> | unsigned int
> | %llx
>
> Use the right print format.
>
> Untested, I can't repro this warning myself. With or without
> the patch mpc512x_defconfig builds just fine.
>
> Link: https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: Randy Dunlap <rdunlap@infradead.org>
> CC: pantelis.antoniou@gmail.com
> CC: linuxppc-dev@lists.ozlabs.org
I'm using gcc-12.2.0.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thanks.
>
> Targeting net-next as I can't repro this, and I don't
> see recent changes which could cause this problem.
> So maybe it's something in linux-next... ?
> In any case res is a struct resource so patch shouldn't hurt.
> ---
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
> index d37d7a19a759..59a8f0bd0f5c 100644
> --- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
> +++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
> @@ -127,7 +127,7 @@ static int fs_enet_mdio_probe(struct platform_device *ofdev)
> if (ret)
> goto out_res;
>
> - snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> + snprintf(new_bus->id, MII_BUS_ID_SIZE, "%pap", &res.start);
>
> fec->fecp = ioremap(res.start, resource_size(&res));
> if (!fec->fecp) {
--
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] eth: fs_enet: fix print format for resource size
2023-06-15 4:02 ` Randy Dunlap
@ 2023-06-15 4:22 ` Jakub Kicinski
-1 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-06-15 4:22 UTC (permalink / raw)
To: Randy Dunlap
Cc: davem, netdev, edumazet, pabeni, pantelis.antoniou, linuxppc-dev
On Wed, 14 Jun 2023 21:02:33 -0700 Randy Dunlap wrote:
> On 6/14/23 20:52, Jakub Kicinski wrote:
> > Randy forwarded report from Stephen that on PowerPC:
>
> Stephen forwarded report from Randy?
>
> netdev & pantelis were cc-ed...
Ah, I misread, you were reporting to Stephen the status for the latest
linux-next!
https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
Seems obvious in hindsight, sorry. I'll reword when applying.
> > drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
> > drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
> > 130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> > | ~^ ~~~~~~~~~
> > | | |
> > | | resource_size_t {aka long long unsigned int}
> > | unsigned int
> > | %llx
> >
> > Use the right print format.
> >
> > Untested, I can't repro this warning myself. With or without
> > the patch mpc512x_defconfig builds just fine.
> >
> > Link: https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > ---
> > CC: Randy Dunlap <rdunlap@infradead.org>
> > CC: pantelis.antoniou@gmail.com
> > CC: linuxppc-dev@lists.ozlabs.org
>
> I'm using gcc-12.2.0.
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thank you! GCC 11.1 here, FWIW.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] eth: fs_enet: fix print format for resource size
@ 2023-06-15 4:22 ` Jakub Kicinski
0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-06-15 4:22 UTC (permalink / raw)
To: Randy Dunlap; +Cc: netdev, edumazet, pabeni, linuxppc-dev, davem
On Wed, 14 Jun 2023 21:02:33 -0700 Randy Dunlap wrote:
> On 6/14/23 20:52, Jakub Kicinski wrote:
> > Randy forwarded report from Stephen that on PowerPC:
>
> Stephen forwarded report from Randy?
>
> netdev & pantelis were cc-ed...
Ah, I misread, you were reporting to Stephen the status for the latest
linux-next!
https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
Seems obvious in hindsight, sorry. I'll reword when applying.
> > drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
> > drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
> > 130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> > | ~^ ~~~~~~~~~
> > | | |
> > | | resource_size_t {aka long long unsigned int}
> > | unsigned int
> > | %llx
> >
> > Use the right print format.
> >
> > Untested, I can't repro this warning myself. With or without
> > the patch mpc512x_defconfig builds just fine.
> >
> > Link: https://lore.kernel.org/all/8f9f8d38-d9c7-9f1b-feb0-103d76902d14@infradead.org/
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> > ---
> > CC: Randy Dunlap <rdunlap@infradead.org>
> > CC: pantelis.antoniou@gmail.com
> > CC: linuxppc-dev@lists.ozlabs.org
>
> I'm using gcc-12.2.0.
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thank you! GCC 11.1 here, FWIW.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] eth: fs_enet: fix print format for resource size
2023-06-15 3:52 ` Jakub Kicinski
@ 2023-06-16 6:00 ` patchwork-bot+netdevbpf
-1 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-16 6:00 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, rdunlap, pantelis.antoniou,
linuxppc-dev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 14 Jun 2023 20:52:31 -0700 you wrote:
> Randy forwarded report from Stephen that on PowerPC:
>
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
> 130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> | ~^ ~~~~~~~~~
> | | |
> | | resource_size_t {aka long long unsigned int}
> | unsigned int
> | %llx
>
> [...]
Here is the summary with links:
- [net-next] eth: fs_enet: fix print format for resource size
https://git.kernel.org/netdev/net-next/c/8f72fb1578a9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] eth: fs_enet: fix print format for resource size
@ 2023-06-16 6:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-16 6:00 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: netdev, rdunlap, edumazet, pabeni, linuxppc-dev, davem
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 14 Jun 2023 20:52:31 -0700 you wrote:
> Randy forwarded report from Stephen that on PowerPC:
>
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c: In function 'fs_enet_mdio_probe':
> drivers/net/ethernet/freescale/fs_enet/mii-fec.c:130:50: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' {aka 'long long unsigned int'} [-Wformat=]
> 130 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start);
> | ~^ ~~~~~~~~~
> | | |
> | | resource_size_t {aka long long unsigned int}
> | unsigned int
> | %llx
>
> [...]
Here is the summary with links:
- [net-next] eth: fs_enet: fix print format for resource size
https://git.kernel.org/netdev/net-next/c/8f72fb1578a9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-06-16 6:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 3:52 [PATCH net-next] eth: fs_enet: fix print format for resource size Jakub Kicinski
2023-06-15 3:52 ` Jakub Kicinski
2023-06-15 4:02 ` Randy Dunlap
2023-06-15 4:02 ` Randy Dunlap
2023-06-15 4:22 ` Jakub Kicinski
2023-06-15 4:22 ` Jakub Kicinski
2023-06-16 6:00 ` patchwork-bot+netdevbpf
2023-06-16 6:00 ` patchwork-bot+netdevbpf
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.