[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250926172611.32d60205@kernel.org>
Date: Fri, 26 Sep 2025 17:26:11 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Furong Xu <0x1207@...il.com>
Cc: netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, Andrew
Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Maxime
Coquelin <mcoquelin.stm32@...il.com>, Alexandre Torgue
<alexandre.torgue@...s.st.com>, xfr@...look.com
Subject: Re: [PATCH net-next] net: stmmac: Convert open-coded register
polling to helper macro
On Wed, 24 Sep 2025 23:22:17 +0800 Furong Xu wrote:
> writel(addend, ioaddr + PTP_TAR);
> /* issue command to update the addend value */
> @@ -144,23 +143,15 @@ static int config_addend(void __iomem *ioaddr, u32 addend)
> writel(value, ioaddr + PTP_TCR);
>
> /* wait for present addend update to complete */
> - limit = 10;
> - while (limit--) {
> - if (!(readl(ioaddr + PTP_TCR) & PTP_TCR_TSADDREG))
> - break;
> - mdelay(10);
> - }
> - if (limit < 0)
> - return -EBUSY;
> -
> - return 0;
> + return readl_poll_timeout_atomic(ioaddr + PTP_TCR, value,
> + !(value & PTP_TCR_TSADDREG),
Why the strange alignment ? I think you can start the continuation line
under the opening bracket and still easily fit in 80 chars?
> + 10, 100000);
You say in the commit message "no functional changes intended"
but you changed the frequency of polling from 10msec to 10usec.
Seems like a reasonable change, but the commit message is lying.
--
pw-bot: cr
Powered by blists - more mailing lists