[PATCH v4 phy 02/16] phy: lynx-28g: refactor lane probing to lynx_28g_probe_lane()
Vladimir Oltean
vladimir.oltean at nxp.com
Thu Nov 13 08:56:46 PST 2025
On Thu, Nov 13, 2025 at 10:19:55PM +0530, Vinod Koul wrote:
> On 10-11-25, 11:22, Vladimir Oltean wrote:
> > diff --git a/drivers/phy/freescale/phy-fsl-lynx-28g.c b/drivers/phy/freescale/phy-fsl-lynx-28g.c
> > index c20d2636c5e9..901240bbcade 100644
> > --- a/drivers/phy/freescale/phy-fsl-lynx-28g.c
> > +++ b/drivers/phy/freescale/phy-fsl-lynx-28g.c
> > @@ -579,12 +579,33 @@ static struct phy *lynx_28g_xlate(struct device *dev,
> > return priv->lane[idx].phy;
> > }
> >
> > +static int lynx_28g_probe_lane(struct lynx_28g_priv *priv, int id,
> > + struct device_node *dn)
> > +{
> > + struct lynx_28g_lane *lane = &priv->lane[id];
> > + struct phy *phy;
> > +
> > + memset(lane, 0, sizeof(*lane));
>
> priv is kzalloc, so why memset here?
Great question, but this is a pattern that was pre-existing in the code,
and I don't like modifying code as I move it. I had to put a stop
somewhere (series is already 16 patch long). I can absolutely remove the
memset in part 2 once this one is merged.
More information about the linux-phy
mailing list