Re: [PATCH 2/2] net: phy: adin1100: Simplify register value passing
From: Russell King (Oracle)
Date: Wed Nov 19 2025 - 08:22:31 EST
On Wed, Nov 19, 2025 at 01:20:51PM +0000, Russell King (Oracle) wrote:
> 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.
Sorry, missed the first patch (the two patches arrived in reverse
order.) Please ignore this comment.
For the patch:
Reviewed-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!