Commit da31735c authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: dsa: rtl8366: Pass GENMASK() signed bits

Oddly, GENMASK() requires signed bit numbers, so that it can compare
them for < 0. If passed an unsigned type, we get warnings about the
test never being true.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 74dc1d46
......@@ -272,7 +272,7 @@ int rtl8366_init_vlan(struct realtek_smi *smi)
/* For the CPU port, make all ports members of this
* VLAN.
*/
mask = GENMASK(smi->num_ports - 1, 0);
mask = GENMASK((int)smi->num_ports - 1, 0);
else
/* For all other ports, enable itself plus the
* CPU port.
......
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