diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-07-05 21:38:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-05 15:43:01 -0700 |
commit | f1931164f06fc645382ee6a79cdb456b66747a5d (patch) | |
tree | 4babeac8c2f9c694f85b7382c4e5851e631a4d25 /drivers | |
parent | 7680b8f15e181cd43dcc771f4779a84643f6b3aa (diff) | |
download | linux-f1931164f06fc645382ee6a79cdb456b66747a5d.tar.bz2 |
net: dsa: mv88e6xxx: Fix sparse warnings from GENMASK
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h index e5430cf2ad71..1c541b074256 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.h +++ b/drivers/net/dsa/mv88e6xxx/chip.h @@ -167,7 +167,7 @@ struct mv88e6xxx_irq { u16 masked; struct irq_chip chip; struct irq_domain *domain; - unsigned int nirqs; + int nirqs; }; /* state flags for mv88e6xxx_port_hwtstamp::state */ @@ -654,7 +654,7 @@ static inline unsigned int mv88e6xxx_num_ports(struct mv88e6xxx_chip *chip) static inline u16 mv88e6xxx_port_mask(struct mv88e6xxx_chip *chip) { - return GENMASK(mv88e6xxx_num_ports(chip) - 1, 0); + return GENMASK((s32)mv88e6xxx_num_ports(chip) - 1, 0); } static inline unsigned int mv88e6xxx_num_gpio(struct mv88e6xxx_chip *chip) |