[PATCH net-next v3 4/9] net: dsa: mt7530: get rid of useless error returns on phylink code path

Russell King (Oracle) linux at armlinux.org.uk
Fri Mar 1 06:52:58 PST 2024


On Fri, Mar 01, 2024 at 12:43:00PM +0200, Arınç ÜNAL via B4 Relay wrote:
> From: Arınç ÜNAL <arinc.unal at arinc9.com>
> 
> 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 at makrotopia.org>
> Tested-by: Daniel Golle <daniel at makrotopia.org>
> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>

Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list