* [PATCH net-next] net: xilinx_emaclite: Do not print real IOMEM pointer
@ 2021-05-19 2:47 YueHaibing
2021-05-21 20:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2021-05-19 2:47 UTC (permalink / raw)
To: davem, kuba, michal.simek
Cc: netdev, linux-arm-kernel, linux-kernel, YueHaibing
Printing kernel pointers is discouraged because they might leak kernel
memory layout. This fixes smatch warning:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn:
argument 4 to %08lX specifier is cast from pointer
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index d9d58a7dabee..b06377fe7293 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1189,9 +1189,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
}
dev_info(dev,
- "Xilinx EmacLite at 0x%08lX mapped to 0x%08lX, irq=%d\n",
- (unsigned long __force)ndev->mem_start,
- (unsigned long __force)lp->base_addr, ndev->irq);
+ "Xilinx EmacLite at 0x%08lX mapped to 0x%p, irq=%d\n",
+ (unsigned long __force)ndev->mem_start, lp->base_addr, ndev->irq);
return 0;
error:
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: xilinx_emaclite: Do not print real IOMEM pointer
2021-05-19 2:47 [PATCH net-next] net: xilinx_emaclite: Do not print real IOMEM pointer YueHaibing
@ 2021-05-21 20:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-21 20:20 UTC (permalink / raw)
To: YueHaibing
Cc: davem, kuba, michal.simek, netdev, linux-arm-kernel, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 19 May 2021 10:47:04 +0800 you wrote:
> Printing kernel pointers is discouraged because they might leak kernel
> memory layout. This fixes smatch warning:
>
> drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn:
> argument 4 to %08lX specifier is cast from pointer
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>
> [...]
Here is the summary with links:
- [net-next] net: xilinx_emaclite: Do not print real IOMEM pointer
https://git.kernel.org/netdev/net-next/c/d0d62baa7f50
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:[~2021-05-21 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 2:47 [PATCH net-next] net: xilinx_emaclite: Do not print real IOMEM pointer YueHaibing
2021-05-21 20:20 ` 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).