Skip to contentSkip to conversation

net: stmmac: make variable data a u32

PATCH Applied Colin Ian King 3 participants 3 messages Aug 11, 2025 – Aug 12, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c +1 -1
index 4846bf49c576..467f1a05747e 100644
@@ -251,7 +251,7 @@ void dwmac_dma_flush_tx_fifo(void __iomem *ioaddr)
 void stmmac_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],
 			 unsigned int high, unsigned int low)
 {
-	unsigned long data;
+	u32 data;
 
 	data = (addr[5] << 8) | addr[4];
 	/* For MAC Addr registers we have to set the Address Enable (AE)
Signature · 1 line
2.50.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Colin Ian King

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.

Thanks!

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
#2 lore raw
In reply to Colin Ian King
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Mon, 11 Aug 2025 12:12:11 +0100 you wrote:

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.

[...]

Here is the summary with links:
- net: stmmac: make variable data a u32

    https://git.kernel.org/netdev/net-next/c/11b99886d194

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html