diff options
author | Arınç ÜNAL <arinc.unal@arinc9.com> | 2024-03-01 11:43:00 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-03-05 12:23:42 +0100 |
commit | adf4ae24ba42473a742f55274c0211ed9dea44af (patch) | |
tree | ec89c3b7dc6eb1bbf528812abb571ddc127fdc81 /drivers/net/dsa/mt7530.h | |
parent | net: dsa: mt7530: do not use SW_PHY_RST to reset MT7531 switch (diff) | |
download | linux-adf4ae24ba42473a742f55274c0211ed9dea44af.tar.xz linux-adf4ae24ba42473a742f55274c0211ed9dea44af.zip |
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>
Diffstat (limited to 'drivers/net/dsa/mt7530.h')
-rw-r--r-- | drivers/net/dsa/mt7530.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h index 26a6d2160c08..b1665de7f640 100644 --- a/drivers/net/dsa/mt7530.h +++ b/drivers/net/dsa/mt7530.h @@ -730,9 +730,9 @@ struct mt753x_info { void (*mac_port_validate)(struct dsa_switch *ds, int port, phy_interface_t interface, unsigned long *supported); - int (*mac_port_config)(struct dsa_switch *ds, int port, - unsigned int mode, - phy_interface_t interface); + void (*mac_port_config)(struct dsa_switch *ds, int port, + unsigned int mode, + phy_interface_t interface); }; /* struct mt7530_priv - This is the main data structure for holding the state |