Re: [net-next PATCH v2 06/14] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

From: Andy Shevchenko
Date: Fri Dec 18 2020 - 10:36:32 EST


On Fri, Dec 18, 2020 at 7:34 AM Calvin Johnson
<calvin.johnson@xxxxxxxxxxx> wrote:
>
> On Tue, Dec 15, 2020 at 07:33:40PM +0200, Andy Shevchenko wrote:
> > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson
> > <calvin.johnson@xxxxxxxxxxx> wrote:

...

> > > + /* phy->mii_ts may already be defined by the PHY driver. A
> > > + * mii_timestamper probed via the device tree will still have
> > > + * precedence.
> > > + */
> >
> > > + if (mii_ts)
> > > + phy->mii_ts = mii_ts;
> >
> > How is that defined? Do you need to do something with an old pointer?
>
> As the comment says, I think PHY drivers which got invoked before calling
> of_mdiobus_register_phy() may have defined phy->mii_ts.

What I meant here is that the old pointer might need some care (freeing?).

> > > + }

--
With Best Regards,
Andy Shevchenko