Re: [net-next PATCH v6 07/15] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 18, 2021 at 7:28 AM Calvin Johnson
<calvin.johnson@xxxxxxxxxxx> wrote:
>
> Introduce fwnode_mdiobus_register_phy() to register PHYs on the
> mdiobus. From the compatible string, identify whether the PHY is
> c45 and based on this create a PHY device instance which is
> registered on the mdiobus.

Thanks for an update!
Below some nit-picks, may be ignored.

> uninitialized symbol 'mii_ts'
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

I don't think the above deserves to be in the commit message (rather
after the cutter '---' line as a changelog).

> Signed-off-by: Calvin Johnson <calvin.johnson@xxxxxxxxxxx>

...

> +               if (mii_ts)
> +                       unregister_mii_timestamper(mii_ts);

...

> +                       if (mii_ts)
> +                               unregister_mii_timestamper(mii_ts);

I'm wondering if we can move this check to the
unregister_mii_timestamper() to make it NULL aware as many other
similar (unregister) APIs do. I have checked that there are currently
three users of this that can benefit of the change.

...

> +       /* 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;

I'm wondering if the belo form is better to read

        phy->mii_ts = mii_ts ?: phy->mii_ts;

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux