From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Alexander Dahl <ada@thorsis.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] net: phy: adin1100: Simplify register value passing
Date: Wed, 19 Nov 2025 13:22:27 +0000 [thread overview]
Message-ID: <aR3Ek7LUsjGt6EZE@shell.armlinux.org.uk> (raw)
In-Reply-To: <aR3EM0OK09bvCT0B@shell.armlinux.org.uk>
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@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-11-19 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 12:47 [PATCH 0/2] net: phy: adin1100: Fix powerdown mode setting Alexander Dahl
2025-11-19 12:47 ` [PATCH 1/2] net: phy: adin1100: Fix software power-down ready condition Alexander Dahl
2025-11-19 13:21 ` Russell King (Oracle)
2025-11-19 12:47 ` [PATCH 2/2] net: phy: adin1100: Simplify register value passing Alexander Dahl
2025-11-19 13:20 ` Russell King (Oracle)
2025-11-19 13:22 ` Russell King (Oracle) [this message]
2025-11-19 15:11 ` [PATCH 0/2] net: phy: adin1100: Fix powerdown mode setting Nuno Sá
2025-11-21 2:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aR3Ek7LUsjGt6EZE@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=ada@thorsis.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).