* [PATCH net-next] net: allwinner: Fix print format
@ 2022-01-08 3:44 Jakub Kicinski
2022-01-10 1:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2022-01-08 3:44 UTC (permalink / raw)
To: davem; +Cc: netdev, Jakub Kicinski, Kees Cook
Kees reports quoted commit introduced the following warning on arm64:
drivers/net/ethernet/allwinner/sun4i-emac.c:922:60: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
922 | netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
| ~^
| | | unsigned int
| %llx
923 | regs->start, resource_size(regs));
| ~~~~~~~~~~~
| |
| resource_size_t {aka long long unsigned int}
.. and another one like that for resource_size().
Switch to %pa and a cast.
Reported-by: Kees Cook <keescook@chromium.org>
Fixes: 47869e82c8b8 ("sun4i-emac.c: add dma support")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/allwinner/sun4i-emac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
index 964227e342ee..849de4564709 100644
--- a/drivers/net/ethernet/allwinner/sun4i-emac.c
+++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
@@ -919,8 +919,8 @@ static int emac_configure_dma(struct emac_board_info *db)
goto out_clear_chan;
}
- netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
- regs->start, resource_size(regs));
+ netdev_info(ndev, "get io resource from device: %pa, size = %u\n",
+ ®s->start, (unsigned int)resource_size(regs));
db->emac_rx_fifo = regs->start + EMAC_RX_IO_DATA_REG;
db->rx_chan = dma_request_chan(&pdev->dev, "rx");
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: allwinner: Fix print format
2022-01-08 3:44 [PATCH net-next] net: allwinner: Fix print format Jakub Kicinski
@ 2022-01-10 1:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-10 1:00 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, keescook
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 7 Jan 2022 19:44:38 -0800 you wrote:
> Kees reports quoted commit introduced the following warning on arm64:
>
> drivers/net/ethernet/allwinner/sun4i-emac.c:922:60: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t' {aka 'long long unsigned int'} [-Werror=format=]
> 922 | netdev_info(ndev, "get io resource from device: 0x%x, size = %u\n",
> | ~^
> | | | unsigned int
> | %llx
> 923 | regs->start, resource_size(regs));
> | ~~~~~~~~~~~
> | |
> | resource_size_t {aka long long unsigned int}
>
> [...]
Here is the summary with links:
- [net-next] net: allwinner: Fix print format
https://git.kernel.org/netdev/net-next/c/009e4ee381a0
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] 2+ messages in thread
end of thread, other threads:[~2022-01-10 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-08 3:44 [PATCH net-next] net: allwinner: Fix print format Jakub Kicinski
2022-01-10 1:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).