net: dsa: mv88e6xxx: fix SERDES IRQ mapping

The current mv88e6xxx SERDES code checks for negative error code from
irq_find_mapping, while this function returns an unsigned integer. This
patch removes this dead code and simply returns 0 is no IRQ is found.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vivien Didelot 2019-08-31 16:18:28 -04:00 committed by David S. Miller
parent 946bc2509e
commit f441ed0f4c
2 changed files with 5 additions and 11 deletions

View File

@ -199,7 +199,7 @@ struct mv88e6xxx_port {
u64 vtu_member_violation; u64 vtu_member_violation;
u64 vtu_miss_violation; u64 vtu_miss_violation;
u8 cmode; u8 cmode;
int serdes_irq; unsigned int serdes_irq;
}; };
struct mv88e6xxx_chip { struct mv88e6xxx_chip {

View File

@ -249,11 +249,8 @@ int mv88e6352_serdes_irq_setup(struct mv88e6xxx_chip *chip, int port)
chip->ports[port].serdes_irq = irq_find_mapping(chip->g2_irq.domain, chip->ports[port].serdes_irq = irq_find_mapping(chip->g2_irq.domain,
MV88E6352_SERDES_IRQ); MV88E6352_SERDES_IRQ);
if (chip->ports[port].serdes_irq < 0) { if (!chip->ports[port].serdes_irq)
dev_err(chip->dev, "Unable to map SERDES irq: %d\n", return 0;
chip->ports[port].serdes_irq);
return chip->ports[port].serdes_irq;
}
/* Requesting the IRQ will trigger irq callbacks. So we cannot /* Requesting the IRQ will trigger irq callbacks. So we cannot
* hold the reg_lock. * hold the reg_lock.
@ -690,11 +687,8 @@ int mv88e6390_serdes_irq_setup(struct mv88e6xxx_chip *chip, int port)
chip->ports[port].serdes_irq = irq_find_mapping(chip->g2_irq.domain, chip->ports[port].serdes_irq = irq_find_mapping(chip->g2_irq.domain,
port); port);
if (chip->ports[port].serdes_irq < 0) { if (!chip->ports[port].serdes_irq)
dev_err(chip->dev, "Unable to map SERDES irq: %d\n", return 0;
chip->ports[port].serdes_irq);
return chip->ports[port].serdes_irq;
}
/* Requesting the IRQ will trigger irq callbacks. So we cannot /* Requesting the IRQ will trigger irq callbacks. So we cannot
* hold the reg_lock. * hold the reg_lock.