Thread (5 messages) flat view 5 messages, 2 authors, 2026-08-06

Re: [PATCH net-next v2 2/3] net: stmmac: fpe: Add missing return in stmmac_fpe_init()

From: Paolo Abeni <pabeni@redhat.com>
Date: 2026-08-06 10:08:20
Also in: linux-arm-kernel, lkml

On 8/3/26 5:23 AM, muhammad.nazim.amirul.nazle.asmade@altera.com wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help