mlxsw: spectrum: Split a helper out of mlxsw_sp_netdevice_event()
authorPetr Machata <petrm@nvidia.com>
Wed, 19 Jul 2023 11:01:21 +0000 (13:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jul 2023 07:54:04 +0000 (08:54 +0100)
commit721717fafdc416c66ed66f10ce9ac01e1f52d145
treeb859a6d4337aaca65c19b241b3aa66253688ca26
parent96c3e45c0130205136a13dab129c207e958a5637
mlxsw: spectrum: Split a helper out of mlxsw_sp_netdevice_event()

Move the meat of mlxsw_sp_netdevice_event() to a separate function that
does just the validation. This separate helper will be possible to call
later for recursive ascent when validating attachment of a front panel port
to a bridge with uppers.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c