Thread (90 messages) flat view 90 messages, 9 authors, 2021-12-31

Re: [PATCH net-next 11/13] net: dsa: realtek: rtl8367c: use GENMASK(n-1,0) instead of BIT(n)-1

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-12-19 20:06:30


On 12/16/2021 12:13 PM, luizluca@gmail.com wrote:
quoted hunk ↗ jump to hunk
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>

Tested-by: Arınç ÜNAL <redacted>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
---
  drivers/net/dsa/realtek/rtl8367c.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/realtek/rtl8367c.c b/drivers/net/dsa/realtek/rtl8367c.c
index 6aca48165d1f..f370ea948c59 100644
--- a/drivers/net/dsa/realtek/rtl8367c.c
+++ b/drivers/net/dsa/realtek/rtl8367c.c
@@ -1955,7 +1955,7 @@ static int rtl8367c_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);
Missing spaces between priv->num_ports, and -1 here, and the comma 
before 0 as well:
		mb->port_mask = GENMASK(priv->num_ports - 1, 0);

is what we would expect to see.
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help