The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: muhammad.nazim.amirul.nazle.asmade@altera.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, 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 2/3] net: stmmac: fpe: Add missing return in stmmac_fpe_init()
Date: Wed, 29 Jul 2026 08:27:33 +0200	[thread overview]
Message-ID: <5cc2d491-2f57-4745-8dcd-3f63ba0cbf96@bootlin.com> (raw)
In-Reply-To: <20260729015247.25774-3-muhammad.nazim.amirul.nazle.asmade@altera.com>

Hi,

On 7/29/26 03:52, 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>

Thanks,

Maxime

> ---
>  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) {
>  		dev_info(priv->device, "FPE is not supported by driver.\n");
> +		return;
> +	}
>  
>  	/* The preemptive MAC in DWMAC is always enabled, so initialize
>  	 * pmac_enabled to true to reflect the hardware state.


  reply	other threads:[~2026-07-29  6:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29  1:52 [PATCH net-next 0/3] net: stmmac: fpe: pmac and fprq fixes muhammad.nazim.amirul.nazle.asmade
2026-07-29  1:52 ` [PATCH net-next 1/3] net: stmmac: fpe: Enforce pmac_enabled in set_mm and keep it on at init muhammad.nazim.amirul.nazle.asmade
2026-07-29  6:26   ` Maxime Chevallier
2026-07-29  1:52 ` [PATCH net-next 2/3] net: stmmac: fpe: Add missing return in stmmac_fpe_init() muhammad.nazim.amirul.nazle.asmade
2026-07-29  6:27   ` Maxime Chevallier [this message]
2026-07-29  1:52 ` [PATCH net-next 3/3] net: stmmac: fpe: Move fprq configuration to stmmac_fpe_configure_pmac() muhammad.nazim.amirul.nazle.asmade
2026-07-29  6:31   ` Maxime Chevallier
2026-08-01  0:55     ` Jakub Kicinski

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=5cc2d491-2f57-4745-8dcd-3f63ba0cbf96@bootlin.com \
    --to=maxime.chevallier@bootlin.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=mcoquelin.stm32@gmail.com \
    --cc=muhammad.nazim.amirul.nazle.asmade@altera.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