diff options
| author | Luiz Angelo Daros de Luca <[email protected]> | 2022-01-28 03:05:04 -0300 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2022-01-28 15:02:49 +0000 |
| commit | c45e0fef9f8913b9dd01f42ebe3d01d13cc22f01 (patch) | |
| tree | 956f194ff640e7d7f413e50d90780abf3c7fb7c4 | |
| parent | d18b59f48b318dcd229bf80f323be9c228da855c (diff) | |
net: dsa: realtek: rtl8365mb: use GENMASK(n-1,0) instead of BIT(n)-1
Signed-off-by: Luiz Angelo Daros de Luca <[email protected]>
Tested-by: Arınç ÜNAL <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Reviewed-by: Alvin Šipraga <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
| -rw-r--r-- | drivers/net/dsa/realtek/rtl8365mb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/realtek/rtl8365mb.c b/drivers/net/dsa/realtek/rtl8365mb.c index 8bffdcb99a3d..c2e6ec257a28 100644 --- a/drivers/net/dsa/realtek/rtl8365mb.c +++ b/drivers/net/dsa/realtek/rtl8365mb.c @@ -1968,7 +1968,7 @@ static int rtl8365mb_detect(struct realtek_priv *priv) mb->priv = priv; mb->chip_id = chip_id; mb->chip_ver = chip_ver; - mb->port_mask = BIT(priv->num_ports) - 1; + mb->port_mask = GENMASK(priv->num_ports - 1, 0); mb->learn_limit_max = RTL8365MB_LEARN_LIMIT_MAX_8365MB_VC; mb->jam_table = rtl8365mb_init_jam_8365mb_vc; mb->jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc); |