lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240922065212.7483-1-nikita.shubin@maquefel.me>
Date: Sun, 22 Sep 2024 09:52:12 +0300
From: Nikita Shubin <nikita.shubin@...uefel.me>
To: Arnd Bergmann <arnd@...db.de>,
	soc@...nel.org
Cc: Alexander Sverdlin <alexander.sverdlin@...il.com>,
	linux-kernel@...r.kernel.org,
	Nikita Shubin <nikita.shubin@...uefel.me>,
	kernel test robot <lkp@...el.com>
Subject: [PATCH] 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@...el.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@...uefel.me>
---
 drivers/net/ethernet/cirrus/ep93xx_eth.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
index 2523d9c9d1b8..c2007cd86416 100644
--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
+++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
@@ -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;
-- 
2.43.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ