From: Jose Abreu Date: Wed, 6 Nov 2019 15:02:55 +0000 (+0100) Subject: net: stmmac: gmac4: bitrev32 returns u32 X-Git-Tag: v5.3.15~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91d8629eea01a5e8833c6cbd33fb4c839e4a99b3;p=thirdparty%2Fkernel%2Fstable.git net: stmmac: gmac4: bitrev32 returns u32 [ 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index 9c73fb759b575..ff830bb5fcaf7 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -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