Skip to content

Commit d14939b

Browse files
vivienJakub Kicinski
authored andcommitted
net: dsa: mv88e6xxx: silently skip PVT ops
Since mv88e6xxx_pvt_map is a static helper, no need to return -EOPNOTSUPP if the chip has no PVT, simply silently skip the operation. Signed-off-by: Vivien Didelot <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent da4561c commit d14939b

File tree

1 file changed

+1
-10
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+1
-10
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ static int mv88e6xxx_pvt_map(struct mv88e6xxx_chip *chip, int dev, int port)
12531253
u16 pvlan = 0;
12541254

12551255
if (!mv88e6xxx_has_pvt(chip))
1256-
return -EOPNOTSUPP;
1256+
return 0;
12571257

12581258
/* Skip the local source device, which uses in-chip port VLAN */
12591259
if (dev != chip->ds->index)
@@ -2049,9 +2049,6 @@ static int mv88e6xxx_bridge_map(struct mv88e6xxx_chip *chip,
20492049
}
20502050
}
20512051

2052-
if (!mv88e6xxx_has_pvt(chip))
2053-
return 0;
2054-
20552052
/* Remap the Port VLAN of each cross-chip bridge group member */
20562053
for (dev = 0; dev < DSA_MAX_SWITCHES; ++dev) {
20572054
ds = chip->ds->dst->ds[dev];
@@ -2101,9 +2098,6 @@ static int mv88e6xxx_crosschip_bridge_join(struct dsa_switch *ds, int dev,
21012098
struct mv88e6xxx_chip *chip = ds->priv;
21022099
int err;
21032100

2104-
if (!mv88e6xxx_has_pvt(chip))
2105-
return 0;
2106-
21072101
mv88e6xxx_reg_lock(chip);
21082102
err = mv88e6xxx_pvt_map(chip, dev, port);
21092103
mv88e6xxx_reg_unlock(chip);
@@ -2116,9 +2110,6 @@ static void mv88e6xxx_crosschip_bridge_leave(struct dsa_switch *ds, int dev,
21162110
{
21172111
struct mv88e6xxx_chip *chip = ds->priv;
21182112

2119-
if (!mv88e6xxx_has_pvt(chip))
2120-
return;
2121-
21222113
mv88e6xxx_reg_lock(chip);
21232114
if (mv88e6xxx_pvt_map(chip, dev, port))
21242115
dev_err(ds->dev, "failed to remap cross-chip Port VLAN\n");

0 commit comments

Comments
 (0)