Re: [PATCH V3 net-next 03/11] net: hibmcge: Add mdio and hardware configuration supported in this module

From: Jijie Shao
Date: Thu Aug 22 2024 - 22:46:01 EST



on 2024/8/23 0:13, Andrew Lunn wrote:
+void hbg_phy_start(struct hbg_priv *priv)
+{
+ if (!priv->mac.phydev)
+ return;
+
+ phy_start(priv->mac.phydev);
+}
+
+void hbg_phy_stop(struct hbg_priv *priv)
+{
+ if (!priv->mac.phydev)
+ return;
+
+ phy_stop(priv->mac.phydev);
Can this condition priv->mac.phydev not be true? The mdio bus setup
and connecting to the PHY seems to be unconditional. If it fails, the
driver fails to probe.

Andrew

Yes, these two functions are called during open or down.
so phy is definitely not be NULL. Therefore, this judgment can be deleted.

Thanks,
Jijie Shao