net: xilinx_emaclite: Do not print real IOMEM pointer
authorYueHaibing <yuehaibing@huawei.com>
Wed, 19 May 2021 02:47:04 +0000 (10:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Aug 2021 11:01:04 +0000 (13:01 +0200)
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>
drivers/net/ethernet/xilinx/xilinx_emaclite.c

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