[PATCH net v2] net: mdio: aspeed: add dummy read to avoid read-after-write issue
Russell King (Oracle)
linux at armlinux.org.uk
Tue Dec 9 03:27:57 PST 2025
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!
More information about the linux-arm-kernel
mailing list