From: "Russell King (Oracle)" <linux@armlinux•org.uk>
To: Jacky Chou <jacky_chou@aspeedtech•com>
Cc: 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>,
Joel Stanley <joel@jms•id.au>,
Andrew Jeffery <andrew@codeconstruct•com.au>,
Potin Lai <potin.lai@quantatw•com>,
netdev@vger•kernel.org, linux-arm-kernel@lists•infradead.org,
linux-aspeed@lists•ozlabs.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH net v2] net: mdio: aspeed: add dummy read to avoid read-after-write issue
Date: Tue, 9 Dec 2025 11:27:57 +0000 [thread overview]
Message-ID: <aTgHva-UVEPl9EAR@shell.armlinux.org.uk> (raw)
In-Reply-To: <20251209-aspeed_mdio_add_dummy_read-v2-1-5f6061641989@aspeedtech.com>
On Tue, Dec 09, 2025 at 07:15:31PM +0800, Jacky Chou wrote:
> + /* Workaround for read-after-write issue.
> + * The controller may return stale data if a read follows immediately
> + * after a write. A dummy read forces the hardware to update its
> + * internal state, ensuring that the next real read returns correct data.
> + */
> + (void)ioread32(ctx->base + ASPEED_MDIO_CTRL);
What purpose does this cast to void achieve in an already void context?
We have plenty of functions that get called in the kernel that return a
value which the caller ignores, never assigning to a variable, none of
these warn.
--
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-12-09 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 11:15 [PATCH net v2] net: mdio: aspeed: add dummy read to avoid read-after-write issue Jacky Chou
2025-12-09 11:27 ` Russell King (Oracle) [this message]
2025-12-10 2:51 ` Jacky Chou
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=aTgHva-UVEPl9EAR@shell.armlinux.org.uk \
--to=linux@armlinux$(echo .)org.uk \
--cc=andrew@codeconstruct$(echo .)com.au \
--cc=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=jacky_chou@aspeedtech$(echo .)com \
--cc=joel@jms$(echo .)id.au \
--cc=kuba@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-aspeed@lists$(echo .)ozlabs.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=potin.lai@quantatw$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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