[PATCH net-next 14/30] net: dsa: mt7530: switch to if/else statements on mt7530_setup_port6()

Vladimir Oltean olteanv at gmail.com
Fri May 26 06:08:16 PDT 2023


On Mon, May 22, 2023 at 03:15:16PM +0300, arinc9.unal at gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal at arinc9.com>
> 
> This code is from before this driver was converted to phylink API. Phylink
> deals with the unsupported interface cases before mt7530_setup_port6() is
> run. Therefore, the default case would never run. However, it must be
> defined nonetheless to handle all the remaining enumeration values, the
> phy-modes.
> 
> Switch to if/else statements which simplifies the code.
> 
> Change mt7530_setup_port6() to void now that there're no error cases left.
> 
> Tested-by: Arınç ÜNAL <arinc.unal at arinc9.com>
> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv at gmail.com>



More information about the Linux-mediatek mailing list