]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: stmmac: gmac4: bitrev32 returns u32
authorJose Abreu <Jose.Abreu@synopsys.com>
Wed, 6 Nov 2019 15:02:55 +0000 (16:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2019 21:33:56 +0000 (22:33 +0100)
[ Upstream commit 4d7c47e34fab0d25790bb6e85b85e26fdf0090d5 ]

The bitrev32 function returns an u32 var, not an int. Fix it.

Fixes: 477286b53f55 ("stmmac: add GMAC4 core support")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c

index 9c73fb759b5758288a44931dc45d1df3d1b4da4c..ff830bb5fcaf7ed3cc20a3974d33eb9514a504ea 100644 (file)
@@ -438,7 +438,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
                         * bits used depends on the hardware configuration
                         * selected at core configuration time.
                         */
-                       int bit_nr = bitrev32(~crc32_le(~0, ha->addr,
+                       u32 bit_nr = bitrev32(~crc32_le(~0, ha->addr,
                                        ETH_ALEN)) >> (32 - mcbitslog2);
                        /* The most significant bit determines the register to
                         * use (H/L) while the other 5 bits determine the bit