net: xilinx_emaclite: Do not print real IOMEM pointer

commit d0d62baa7f505bd4c59cd169692ff07ec49dde37 upstream.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
YueHaibing 2021-05-19 10:47:04 +08:00 committed by AuxXxilium
parent 23f43fe55a
commit 0a5055b80c

View File

@ -1191,9 +1191,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
} }
dev_info(dev, dev_info(dev,
"Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n", "Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
(unsigned int __force)ndev->mem_start, (unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
(unsigned int __force)lp->base_addr, ndev->irq);
return 0; return 0;
error: error: