From: Paolo Abeni <pabeni@redhat.com>
To: muhammad.nazim.amirul.nazle.asmade@altera.com,
maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com
Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/3] net: stmmac: fpe: Add missing return in stmmac_fpe_init()
Date: Thu, 6 Aug 2026 12:07:59 +0200 [thread overview]
Message-ID: <a4b4b8c1-6c6a-40d3-a8f2-727407b0bfa2@redhat.com> (raw)
In-Reply-To: <20260803032358.16282-3-muhammad.nazim.amirul.nazle.asmade@altera.com>
On 8/3/26 5:23 AM, muhammad.nazim.amirul.nazle.asmade@altera.com wrote:
> From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
>
> When FPE is not supported by the driver, stmmac_fpe_init() prints a
> warning but falls through into the pmac_enabled initialization, which
> should only be reached on supported hardware. Add the missing return
> to prevent this.
>
> Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
> Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> v2: No changes. Collect Reviewed-by from Maxime Chevallier.
>
> drivers/net/ethernet/stmicro/stmmac/stmmac_fpe.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_fpe.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_fpe.c
> index 2f880c5e35b0..3436e962a238 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_fpe.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_fpe.c
> @@ -174,8 +174,10 @@ void stmmac_fpe_init(struct stmmac_priv *priv)
> &stmmac_mmsv_ops);
>
> if ((!priv->fpe_cfg.reg || !priv->hw->mac->fpe_map_preemption_class) &&
> - priv->dma_cap.fpesel)
> + priv->dma_cap.fpesel) {
Sashiko noted that the above condition does not reach the intended effect:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260803032358.16282-1-muhammad.nazim.amirul.nazle.asmade%40altera.com
Also please be aware of net-next commit c82ff94592fb
/P
next prev parent reply other threads:[~2026-08-06 10:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 3:23 [PATCH net-next v2 0/3] net: stmmac: fpe: pmac and fprq fixes muhammad.nazim.amirul.nazle.asmade
2026-08-03 3:23 ` [PATCH net-next v2 1/3] net: stmmac: fpe: Enforce pmac_enabled in set_mm and keep it on at init muhammad.nazim.amirul.nazle.asmade
2026-08-03 3:23 ` [PATCH net-next v2 2/3] net: stmmac: fpe: Add missing return in stmmac_fpe_init() muhammad.nazim.amirul.nazle.asmade
2026-08-06 10:07 ` Paolo Abeni [this message]
2026-08-03 3:23 ` [PATCH net-next v2 3/3] net: stmmac: fpe: Move fprq configuration to stmmac_fpe_configure_pmac() muhammad.nazim.amirul.nazle.asmade
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=a4b4b8c1-6c6a-40d3-a8f2-727407b0bfa2@redhat.com \
--to=pabeni@redhat.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=muhammad.nazim.amirul.nazle.asmade@altera.com \
--cc=netdev@vger.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
all inboxes | Powered by JetHome®