Skip to content

Commit 878716d

Browse files
maquefelarndb
authored andcommitted
net: cirrus: use u8 for addr to calm down sparse
ep93xx_eth.c:805:40: sparse: sparse: incorrect type in argument 2 (different address spaces) ep93xx_eth.c:805:40: sparse: expected unsigned char const [usertype] *addr ep93xx_eth.c:805:40: sparse: got void [noderef] __iomem * Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409212354.9CiUem7B-lkp@intel.com/ Fixes: 858555bb5598 ("net: cirrus: add DT support for Cirrus EP93xx") Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me> Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent d7333f9 commit 878716d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/cirrus/ep93xx_eth.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
771771
struct resource *mem;
772772
void __iomem *base_addr;
773773
struct device_node *np;
774+
u8 addr[ETH_ALEN];
774775
u32 phy_id;
775776
int irq;
776777
int err;
@@ -802,7 +803,8 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
802803
goto err_out;
803804
}
804805

805-
eth_hw_addr_set(dev, base_addr + 0x50);
806+
memcpy_fromio(addr, base_addr + 0x50, ETH_ALEN);
807+
eth_hw_addr_set(dev, addr);
806808
dev->ethtool_ops = &ep93xx_ethtool_ops;
807809
dev->netdev_ops = &ep93xx_netdev_ops;
808810
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;

0 commit comments

Comments
 (0)