Skip to content

Commit

Permalink
net: dsa: realtek: rtl8365mb: use GENMASK(n-1,0) instead of BIT(n)-1
Browse files Browse the repository at this point in the history
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Luiz Angelo Daros de Luca authored and David S. Miller committed Jan 28, 2022
1 parent d18b59f commit c45e0fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/dsa/realtek/rtl8365mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c45e0fe

Please sign in to comment.