Re: [PATCH net-next] net: phy: fix up const issues in to_mdio_device() and to_phy_device()

patchwork-bot+netdevbpf
2025-05-28T01:20:22Z

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 22 May 2025 13:21:47 +0200 you wrote:
> Both to_mdio_device() and to_phy_device() "throw away" the const pointer
> attribute passed to them and return a non-const pointer, which generally
> is not a good thing overall. Fix this up by using container_of_const()
> which was designed for this very problem.
>
> Cc: Alexander Lobakin <alobakin@pm.me>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Heiner Kallweit <hkallweit1@gmail.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Fixes: 7eab14de73a8 ("mdio, phy: fix -Wshadow warnings triggered by nested container_of()")
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> [...]

Here is the summary with links:
- [net-next] net: phy: fix up const issues in to_mdio_device() and to_phy_device()
https://git.kernel.org/netdev/net-next/c/e9cb929670a1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.