[PATCH net-next v5 2/7] net: stmmac: Add dedicated XPCS cleanup method
Romain Gantois
romain.gantois at bootlin.com
Mon May 6 00:07:41 PDT 2024
Hi Serge,
On Fri, 3 May 2024, Serge Semin wrote:
>
> > +void stmmac_pcs_clean(struct stmmac_priv *priv)
>
> Ideally it would have been great to have the entire driver fixed to
> accept the stmmac_priv pointer as the functions argument. But this
> would be too tiresome. Anyway seeing the PCS-setup protagonist method
> has the net_device pointer passed I would implement the same prototype
> for the antagonist even though it would require an additional local
> variable. That will make the MDIO and PCS local interface-functions
> looking alike and as if unified. That is the reason of why I made
> stmmac_xpcs_clean() accepting the net_device pointer.
>
> Alternatively both stmmac_pcs_setup() and stmmac_pcs_clean() could be
> converted to just accepting a pointer to the stmmac_priv instance.
I think that adapting stmmac_pcs_clean() to take a net_device struct would be
more appropriate since it's the simpler of the two methods. I'll implement this
in the next version.
Thanks,
--
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-arm-kernel
mailing list