Commit 878716d4 authored by Nikita Shubin's avatar Nikita Shubin Committed by Arnd Bergmann
Browse files

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: default avatarkernel 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: default avatarNikita Shubin <nikita.shubin@maquefel.me>
Acked-by: default avatarAlexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent d7333f9d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -771,6 +771,7 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
	struct resource *mem;
	void __iomem *base_addr;
	struct device_node *np;
	u8 addr[ETH_ALEN];
	u32 phy_id;
	int irq;
	int err;
@@ -802,7 +803,8 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
		goto err_out;
	}

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