From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Simon Horman <horms@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
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>,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Vinod Koul <vkoul@kernel.org>
Subject: Re: [PATCH net-next] net: stmmac: qcom-ethqos: add ethqos_pcs_set_inband()
Date: Sat, 14 Jun 2025 19:22:04 +0100 [thread overview]
Message-ID: <aE29zFKp5PLAM5pP@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250614153512.GQ414686@horms.kernel.org>
On Sat, Jun 14, 2025 at 04:35:12PM +0100, Simon Horman wrote:
> On Thu, Jun 12, 2025 at 05:16:30PM +0100, Russell King (Oracle) wrote:
> > Add ethqos_pcs_set_inband() to improve readability, and to allow future
> > changes when phylink PCS support is properly merged.
> >
> > Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
> > Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sa8775p-ride-r3
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
>
> Thanks Russell,
>
> The nit below notwithstanding this looks good to me.
>
> Reviewed-by: Simon Horman <horms@kernel.org>
>
> > ---
> > .../net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 13 +++++++++----
> > 1 file changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> > index e30bdf72331a..2e398574c7a7 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> > @@ -622,6 +622,11 @@ static void ethqos_set_serdes_speed(struct qcom_ethqos *ethqos, int speed)
> > }
> > }
> >
> > +static void ethqos_pcs_set_inband(struct stmmac_priv *priv, bool enable)
> > +{
> > + stmmac_pcs_ctrl_ane(priv, priv->ioaddr, enable, 0, 0);
>
> FWIIW, I would have gone for the following, as all the type of
> three of the trailing parameters is bool.
>
> stmmac_pcs_ctrl_ane(priv, priv->ioaddr, enable, false, false);
So the original code:
stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 0, 0, 0);
stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 1, 0, 0);
stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 1, 0, 0);
stmmac_pcs_ctrl_ane(priv, priv->ioaddr, 1, 0, 0);
While one could convert the last two arguments to true/false, I'd prefer
leaving them as is, as less change means less chance to introduce a bug.
--
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-06-14 18:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-12 16:16 [PATCH net-next] net: stmmac: qcom-ethqos: add ethqos_pcs_set_inband() Russell King (Oracle)
2025-06-14 15:35 ` Simon Horman
2025-06-14 18:22 ` Russell King (Oracle) [this message]
2025-06-16 15:23 ` Simon Horman
2025-06-14 19:00 ` 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=aE29zFKp5PLAM5pP@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=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vkoul@kernel.org \
/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).