Re: [PATCH net-next 1/2] net: dsa: microchip: Drop unnecessary check in ksz9477 PCS setup

From: Vladimir Oltean

Date: Tue Mar 24 2026 - 16:37:34 EST


On Tue, Mar 24, 2026 at 07:08:24PM +0100, Maxime Chevallier wrote:
> The ksz_dev_ops .pcs_create() is called under the assumption that the
> switch has a PCS port :
>
> if (ksz_has_sgmii_port(dev) && dev->dev_ops->pcs_create) {
> ret = dev->dev_ops->pcs_create(dev);
> [...]
> }
>
> The KSZ9477 implementation of .pcs_create() does the same check on
> ksz_has_sgmii_port(), and protects the entire function with it.
>
> Drop it, saving a level of indentation and increasing readability.
>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
> ---

Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>