net: mvmdio: use GENMASK for masks
authorAntoine Ténart <antoine.tenart@free-electrons.com>
Thu, 15 Jun 2017 14:43:18 +0000 (16:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Jun 2017 16:27:11 +0000 (12:27 -0400)
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>
drivers/net/ethernet/marvell/mvmdio.c

index 17b518b13ae3ad65a857d507b850af81361f3fcb..583f1c5753c216afd76d1e235d6d91cfc08f24d2 100644 (file)
@@ -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;