Ver código fonte

net: mvmdio: use GENMASK for masks

Cosmetic patch to use the GENMASK helper for masks.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Antoine Ténart 8 anos atrás
pai
commit
fd3ebd8578
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/net/ethernet/marvell/mvmdio.c

+ 1 - 1
drivers/net/ethernet/marvell/mvmdio.c

@@ -138,7 +138,7 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
 		goto out;
 	}
 
-	ret = val & 0xFFFF;
+	ret = val & GENMASK(15, 0);
 out:
 	mutex_unlock(&dev->lock);
 	return ret;