[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8B4OSbY954Zy37S@shell.armlinux.org.uk>
Date: Thu, 27 Feb 2025 14:35:37 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Neil Armstrong <neil.armstrong@...aro.org>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Jerome Brunet <jbrunet@...libre.com>,
Kevin Hilman <khilman@...libre.com>,
linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 10/11] net: stmmac: meson: switch to use
set_clk_tx_rate() hook
On Thu, Feb 27, 2025 at 03:18:22PM +0100, Neil Armstrong wrote:
> Hi,
>
> On 27/02/2025 10:17, Russell King (Oracle) wrote:
> > Switch from using the fix_mac_speed() hook to set_clk_tx_rate() to
> > manage the transmit clock.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> > ---
> > drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c | 9 ++++++---
> > 1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
> > index b115b7873cef..07c504d07604 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson.c
> > @@ -22,9 +22,10 @@ struct meson_dwmac {
> > void __iomem *reg;
> > };
> > -static void meson6_dwmac_fix_mac_speed(void *priv, int speed, unsigned int mode)
> > +static int meson6_dwmac_set_clk_tx_rate(void *bsp_priv, struct clk *clk_tx_i,
> > + phy_interface_t interface, int speed)
>
> You can keep priv as first argument name and remove the next changes
I *can* but I don't want to. Inside the bulk of the stmmac driver,
"priv" is used with struct stmmac_priv. "plat_dat" is used with
struct plat_stmmacenet_data.
Having different parts of the driver use the same local variable
name for different structures is confusing, and has already lead to
errors. Consistency is key. This is called "bsp_priv" in
struct plat_stmmacenet_data, and therefore it should be referred to
as "bsp_priv".
I am not yet going to be doing a big rename, but it *will* come in
time.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists