Skip to content

Commit 25cff25

Browse files
YueHaibinggregkh
authored andcommitted
net: xilinx_emaclite: Do not print real IOMEM pointer
commit d0d62ba 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 <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Pavel Machek (CIP) <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6a002d4 commit 25cff25

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/net/ethernet/xilinx/xilinx_emaclite.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,9 +1191,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
11911191
}
11921192

11931193
dev_info(dev,
1194-
"Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n",
1195-
(unsigned int __force)ndev->mem_start,
1196-
(unsigned int __force)lp->base_addr, ndev->irq);
1194+
"Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
1195+
(unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
11971196
return 0;
11981197

11991198
error:

0 commit comments

Comments
 (0)