Commit c45e0fef authored by Luiz Angelo Daros de Luca's avatar Luiz Angelo Daros de Luca Committed by David S. Miller

net: dsa: realtek: rtl8365mb: use GENMASK(n-1,0) instead of BIT(n)-1

Signed-off-by: default avatarLuiz Angelo Daros de Luca <luizluca@gmail.com>
Tested-by: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d18b59f4
...@@ -1968,7 +1968,7 @@ static int rtl8365mb_detect(struct realtek_priv *priv) ...@@ -1968,7 +1968,7 @@ static int rtl8365mb_detect(struct realtek_priv *priv)
mb->priv = priv; mb->priv = priv;
mb->chip_id = chip_id; mb->chip_id = chip_id;
mb->chip_ver = chip_ver; 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->learn_limit_max = RTL8365MB_LEARN_LIMIT_MAX_8365MB_VC;
mb->jam_table = rtl8365mb_init_jam_8365mb_vc; mb->jam_table = rtl8365mb_init_jam_8365mb_vc;
mb->jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc); mb->jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment