Re: [PATCH 2/2] net: phy: adin1100: Simplify register value passing
From: Russell King (Oracle)
Date: Wed Nov 19 2025 - 08:20:58 EST
On Wed, Nov 19, 2025 at 01:47:37PM +0100, Alexander Dahl wrote:
> The additional use case for that variable is gone,
> the expression is simple enough to pass it inline now.
Looking at net-next, this patch is wrong. You remove "val" but the code
after the context in this patch is:
return phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1, ADIN_CRSM_STAT, ret,
(ret & ADIN_CRSM_SFT_PD_RDY) == val,
1000, 30000, true);
which also references "val".
Note that this code is buggy as things stand. "val" will be zero (when
en is false) or 1 (when en is true), whereas ADIN_CRSM_SFT_PD_RDY is 2.
Thus, if en is true, then the condition can never be true.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!