[PATCH net-next] net: phy: constify phydev->drv
Andrew Lunn
andrew at lunn.ch
Sat Feb 3 08:56:19 PST 2024
On Fri, Feb 02, 2024 at 05:41:45PM +0000, Russell King (Oracle) wrote:
> Device driver structures are shared between all devices that they
> match, and thus nothing should never write to the device driver
nothing should never ???
I guess the never should be ever?
> diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
> index 7fd9fe6a602b..7b1bc5fcef9b 100644
> --- a/drivers/net/phy/xilinx_gmii2rgmii.c
> +++ b/drivers/net/phy/xilinx_gmii2rgmii.c
> @@ -22,7 +22,7 @@
>
> struct gmii2rgmii {
> struct phy_device *phy_dev;
> - struct phy_driver *phy_drv;
> + const struct phy_driver *phy_drv;
> struct phy_driver conv_phy_drv;
> struct mdio_device *mdio;
> };
Did you build testing include xilinx_gmii2rgmii.c ? It does funky
things with phy_driver structures.
Thanks
Andrew
More information about the linux-arm-kernel
mailing list