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

From: Vladimir Oltean
Date: Fri May 26 2023 - 09:08:25 EST


On Mon, May 22, 2023 at 03:15:16PM +0300, arinc9.unal@xxxxxxxxx wrote:
> From: Arınç ÜNAL <arinc.unal@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Signed-off-by: Arınç ÜNAL <arinc.unal@xxxxxxxxxx>
> ---

Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>