Skip to content
Commit e9cb9296 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Jakub Kicinski
Browse files

net: phy: fix up const issues in to_mdio_device() and to_phy_device()



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: 7eab14de ("mdio, phy: fix -Wshadow warnings triggered by nested container_of()")
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/2025052246-conduit-glory-8fc9@gregkh


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent cb575e5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment