Re: [PATCH net-next v3 5/7] net: mdiobus: search for PSE nodes by parsing PHY nodes.

From: Andrew Lunn
Date: Sat Aug 27 2022 - 12:46:46 EST


> @@ -26,6 +26,7 @@
> #include <linux/netdevice.h>
> #include <linux/phy.h>
> #include <linux/phy_led_triggers.h>
> +#include <linux/pse-pd/pse.h>
> #include <linux/property.h>
> #include <linux/sfp.h>
> #include <linux/skbuff.h>
> @@ -988,6 +989,7 @@ EXPORT_SYMBOL(phy_device_register);
> */
> void phy_device_remove(struct phy_device *phydev)
> {
> + pse_control_put(phydev->psec);
> unregister_mii_timestamper(phydev->mii_ts);

Just a nit-pick: I try to do remove in the opposite order to register,
just in case there are any inter-dependencies. It seems very unlikely
that the time stamper would depend on the psa, but the order performed
in register would allow it.

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew