Thread (2 messages) 2 messages, 1 author, 2025-10-25

Re: [PATCH net-next] net: stmmac: mdio: fix smatch warning

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: 2025-10-25 18:33:53
Also in: linux-arm-kernel

On 10/24/2025 9:26 PM, Heiner Kallweit wrote:
max_addr is the max number of addresses, not the highest possible address,
therefore check phydev->mdio.addr > max_addr isn't correct.
To fix this change the semantics of max_addr, so that it represents
the highest possible address. IMO this is also a little bit more intuitive
wrt name max_addr.

Reported-by: Dan Carpenter <redacted>
Reported-by: Simon Horman <horms@kernel.org>
Fixes: 4a107a0e8361 ("net: stmmac: mdio: use phy_find_first to simplify stmmac_mdio_register")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
CI complains about the patch title, so I'll change it and send a v2.

--
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help