]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: remove "ds" and "port" from struct dsa_switchdev_event_work
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 23 Feb 2022 14:00:51 +0000 (16:00 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Feb 2022 05:31:43 +0000 (21:31 -0800)
commitadda64a294198c0b2ed0185c98d2ba560fcee6e6
tree61dc75284fbd358e983b32c2dbec59191dd0c854
parent28161480b7274bbf04ccad38de5427f178db5e3c
net: dsa: remove "ds" and "port" from struct dsa_switchdev_event_work

By construction, the struct net_device *dev passed to
dsa_slave_switchdev_event_work() via struct dsa_switchdev_event_work
is always a DSA slave device.

Therefore, it is redundant to pass struct dsa_switch and int port
information in the deferred work structure. This can be retrieved at all
times from the provided struct net_device via dsa_slave_to_port().

For the same reason, we can drop the dsa_is_user_port() check in
dsa_fdb_offload_notify().

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/dsa_priv.h
net/dsa/slave.c