net: dsa: mt7530: get rid of useless error returns on phylink code path
authorArınç ÜNAL <arinc.unal@arinc9.com>
Fri, 1 Mar 2024 10:43:00 +0000 (12:43 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 Mar 2024 11:23:42 +0000 (12:23 +0100)
commitadf4ae24ba42473a742f55274c0211ed9dea44af
treeec89c3b7dc6eb1bbf528812abb571ddc127fdc81
parenta565f98d7d25ce5125956fc61c47526c8041e531
net: dsa: mt7530: get rid of useless error returns on phylink code path

Remove error returns on the cases where they are already handled with the
function the mac_port_get_caps member in mt753x_table points to.

mt7531_mac_config() is also called from mt7531_cpu_port_config() outside of
phylink but the port and interface modes are already handled there.

Change the functions and the mac_port_config function pointer to void now
that there're no error returns anymore.

Remove mt753x_is_mac_port() that used to help the said error returns.

On mt7531_mac_config(), switch to if statements to simplify the code.

Remove internal phy cases from mt753x_phylink_mac_config(), there is no
need to check the interface mode as that's already handled with the
function the mac_port_get_caps member in mt753x_table points to.

Acked-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mt7530.c
drivers/net/dsa/mt7530.h