Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: stmmac: make variable data a u32

Make data a u32 instead of an unsigned long, this way it is
explicitly the same width as the operations performed on it
and the same width as a writel store, and it cleans up sign
extention warnings when 64 bit static analysis is performed
on the code.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20250811111211.1646600-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Colin Ian King and committed by
Jakub Kicinski
11b99886 63fe077c

+1 -1
+1 -1
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
··· 251 251 void stmmac_set_mac_addr(void __iomem *ioaddr, const u8 addr[6], 252 252 unsigned int high, unsigned int low) 253 253 { 254 - unsigned long data; 254 + u32 data; 255 255 256 256 data = (addr[5] << 8) | addr[4]; 257 257 /* For MAC Addr registers we have to set the Address Enable (AE)