diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-07-05 22:42:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-05 15:47:28 -0700 |
commit | da31735cb9db61dccea0bc9eeb581b41106a247a (patch) | |
tree | f1063e191c20598f7eb9531ef22fb074d1a20c09 /drivers | |
parent | 74dc1d46ee52037b10b7e55a993764baa93f2f18 (diff) |
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: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dsa/rtl8366.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index ac88caca5ad4..993cf3ac59d9 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c @@ -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. |