lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTgHva-UVEPl9EAR@shell.armlinux.org.uk>
Date: Tue, 9 Dec 2025 11:27:57 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Jacky Chou <jacky_chou@...eedtech.com>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Joel Stanley <joel@....id.au>,
	Andrew Jeffery <andrew@...econstruct.com.au>,
	Potin Lai <potin.lai@...ntatw.com>, netdev@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-aspeed@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: mdio: aspeed: add dummy read to avoid
 read-after-write issue

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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ