From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Jose Abreu <joabreu@synopsys.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v4 07/18] net: stmmac: clean up stmmac_disable_eee_mode()
Date: Wed, 8 Jan 2025 20:25:07 +0000 [thread overview]
Message-ID: <Z37fI8dMLOS7-ky7@shell.armlinux.org.uk> (raw)
In-Reply-To: <E1tVZDw-0002KL-Gg@rmk-PC.armlinux.org.uk>
On Wed, Jan 08, 2025 at 04:48:04PM +0000, Russell King (Oracle) wrote:
> stmmac_disable_eee_mode() is now only called from stmmac_xmit() when
> both priv->tx_path_in_lpi_mode and priv->eee_sw_timer_en are true.
> Therefore:
>
> if (!priv->eee_sw_timer_en)
>
> in stmmac_disable_eee_mode() will never be true, so this is dead code.
> Remove it, and rename the function to indicate that it now only deals
> with software based EEE mode.
>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index de06aa1ff3f6..9a043d19ebac 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -427,18 +427,13 @@ static int stmmac_enable_eee_mode(struct stmmac_priv *priv)
> }
>
> /**
> - * stmmac_disable_eee_mode - disable and exit from LPI mode
> + * stmmac_disable_sw_eee_mode - disable and exit from LPI mode
> * @priv: driver private structure
> * Description: this function is to exit and disable EEE in case of
> * LPI state is true. This is called by the xmit.
> */
> -static void stmmac_disable_eee_mode(struct stmmac_priv *priv)
> +static void stmmac_disable_sw_eee_mode(struct stmmac_priv *priv)
Looking at this again, I'm still not happy with the function name, but
not enough to send another version. I'll change it to
stmmac_stop_sw_lpi() in the next batch of stmmac EEE cleanups (there
is more to come!)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-01-08 20:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-08 16:47 [PATCH net-next v4 00/18] net: stmmac: clean up and fix EEE implementation Russell King (Oracle)
2025-01-08 16:47 ` [PATCH net-next v4 01/18] net: phy: add configuration of rx clock stop mode Russell King (Oracle)
2025-01-08 16:47 ` [PATCH net-next v4 02/18] net: stmmac: move tx_lpi_timer tracking to phylib Russell King (Oracle)
2025-01-08 16:47 ` [PATCH net-next v4 03/18] net: stmmac: use correct type for tx_lpi_timer Russell King (Oracle)
2025-01-08 16:47 ` [PATCH net-next v4 04/18] net: stmmac: use unsigned int for eee_timer Russell King (Oracle)
2025-01-08 16:47 ` [PATCH net-next v4 05/18] net: stmmac: make EEE depend on phy->enable_tx_lpi Russell King (Oracle)
2025-01-08 16:47 ` [PATCH net-next v4 06/18] net: stmmac: remove redundant code from ethtool EEE ops Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 07/18] net: stmmac: clean up stmmac_disable_eee_mode() Russell King (Oracle)
2025-01-08 20:25 ` Russell King (Oracle) [this message]
2025-01-08 16:48 ` [PATCH net-next v4 08/18] net: stmmac: remove priv->tx_lpi_enabled Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 09/18] net: stmmac: report EEE error statistics if EEE is supported Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 10/18] net: stmmac: convert to use phy_eee_rx_clock_stop() Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 11/18] net: stmmac: remove priv->eee_tw_timer Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 12/18] net: stmmac: move priv->eee_enabled into stmmac_eee_init() Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 13/18] net: stmmac: move priv->eee_active " Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 14/18] net: stmmac: use boolean for eee_enabled and eee_active Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 15/18] net: stmmac: move setup of eee_ctrl_timer to stmmac_dvr_probe() Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 16/18] net: stmmac: remove unnecessary EEE handling in stmmac_release() Russell King (Oracle)
2025-01-08 16:48 ` [PATCH net-next v4 17/18] net: stmmac: split hardware LPI timer control Russell King (Oracle)
2025-01-08 16:49 ` [PATCH net-next v4 18/18] net: stmmac: remove stmmac_lpi_entry_timer_config() Russell King (Oracle)
2025-01-11 2:10 ` [PATCH net-next v4 00/18] net: stmmac: clean up and fix EEE implementation patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z37fI8dMLOS7-ky7@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).