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

Vladimir Oltean
2023-05-26T13:08:51Z

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

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