]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: net: xilinx_emaclite: Fix -Wpointer-to-int-cast warnings with W=1
authorAndrew Lunn <andrew@lunn.ch>
Tue, 10 Nov 2020 02:40:23 +0000 (03:40 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 22:32:31 +0000 (14:32 -0800)
commit1f232ab7d37ea149033048efec0c6a8950f46556
tree69d56552e881fcfd273c08b20de1773dcfaaf3c4
parentc15788c67db15cc53912bc86d6eea3480da7e0ae
drivers: net: xilinx_emaclite: Fix -Wpointer-to-int-cast warnings with W=1

drivers/net/ethernet//xilinx/xilinx_emaclite.c:341:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  341 |   addr = (void __iomem __force *)((u32 __force)addr ^

Use uintptr_t instead of u32 to avoid problems on 64 bit systems.

Also, cast the address to an unsigned long for printing.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/xilinx/xilinx_emaclite.c