Re: [PATCH net-next 1/2] net: stmmac: Add PCS_LYNX as a dependency for the whole driver

From: Russell King (Oracle)
Date: Tue Jun 06 2023 - 06:46:57 EST


On Tue, Jun 06, 2023 at 12:35:23PM +0200, Geert Uytterhoeven wrote:
> Hi Russell,
>
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > index fa07b0d50b46..1801f8cc8413 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -940,9 +940,6 @@ static struct phylink_pcs *stmmac_mac_select_pcs(struct phylink_config *config,
> > if (priv->hw->xpcs)
> > return &priv->hw->xpcs->pcs;
> >
> > - if (priv->hw->lynx_pcs)
> > - return priv->hw->lynx_pcs;
> > -
> > return NULL;
> > }
>
> I think the above hunk is wrong, and should be replaced by a removal
> of the call to lynx_pcs_destroy()?

Indeed, and wrong file too. Thanks for spotting, I think we spotted
the mistake at almost the same time. Replacement patch sent.

It'd be good to have the patch thoroughly reviewed to make sure I
haven't missed anything else, bearing in mind that I don't know this
driver inside out and don't have the hardware.

Thanks.

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