summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx/chip.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-12-06 18:57:49 +0200
committerJakub Kicinski <kuba@kernel.org>2021-12-08 14:31:14 -0800
commit872bb81dfbc3811bc77aafd63deca73a08a9c20f (patch)
treeb54887840e55209905ac8c6350f1502ce5134a5b /drivers/net/dsa/mv88e6xxx/chip.c
parent947c8746e2c31bb469ba9ee02dc739be6a98ee38 (diff)
net: dsa: mt7530: iterate using dsa_switch_for_each_user_port in bridging ops
Avoid repeated calls to dsa_to_port() (some hidden behind dsa_is_user_port and some in plain sight) by keeping two struct dsa_port references: one to the port passed as argument, and another to the other ports of the switch that we're iterating over. dsa_to_port(ds, i) gets replaced by other_dp, i gets replaced by other_port which is derived from other_dp->index, dsa_is_user_port is handled by the DSA iterator. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/chip.c')
0 files changed, 0 insertions, 0 deletions