]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: stmmac: make variable data a u32
authorColin Ian King <colin.i.king@gmail.com>
Mon, 11 Aug 2025 11:12:11 +0000 (12:12 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Aug 2025 21:11:48 +0000 (14:11 -0700)
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>
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c

index 4846bf49c576a2647c38f32c3c99bad996ce8458..467f1a05747ecf0be5b9f3392cd3d2049d676c21 100644 (file)
@@ -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)