netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	"Yannick Vignon" <yannick.vignon@nxp.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	<netdev@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH net-next] net: stmmac: Simplify mtl IRQ status checking
Date: Thu, 8 Feb 2024 15:52:27 +0100	[thread overview]
Message-ID: <ZcTqqwmGTIEq6bfO@boxer> (raw)
In-Reply-To: <871q9n81s1.fsf@kurt.kurt.home>

On Thu, Feb 08, 2024 at 03:32:30PM +0100, Kurt Kanzenbach wrote:
> On Thu Feb 08 2024, Maciej Fijalkowski wrote:
> > On Thu, Feb 08, 2024 at 11:35:25AM +0100, Kurt Kanzenbach wrote:
> >> Commit 8a7cb245cf28 ("net: stmmac: Do not enable RX FIFO overflow
> >> interrupts") disabled the RX FIFO overflow interrupts. However, it left the
> >> status variable around, but never checks it.
> >> 
> >> As stmmac_host_mtl_irq_status() returns only 0 now, the code can be
> >> simplified.
> >> 
> >> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> >> ---
> >>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++----
> >>  1 file changed, 2 insertions(+), 4 deletions(-)
> >> 
> >> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> >> index 04d817dc5899..10ce2f272b62 100644
> >> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> >> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> >> @@ -6036,10 +6036,8 @@ static void stmmac_common_interrupt(struct stmmac_priv *priv)
> >>  				priv->tx_path_in_lpi_mode = false;
> >>  		}
> >>  
> >> -		for (queue = 0; queue < queues_count; queue++) {
> >> -			status = stmmac_host_mtl_irq_status(priv, priv->hw,
> >> -							    queue);
> >> -		}
> >> +		for (queue = 0; queue < queues_count; queue++)
> >> +			stmmac_host_mtl_irq_status(priv, priv->hw, queue);
> >
> > Hey Kurt,
> >
> > looks to me that all of the current callbacks just return 0 so why not
> > make them return void instead?
> 
> Well, there are two callbacks of this in dwmac4 and dwxgmac2. Both of
> them still have the code for handling the overflow interrupt (and then
> returning != 0). However, as of commit 8a7cb245cf28 the interrupt
> shouldn't fire. So yes, it could be changed to void along with some
> code removal. But, maybe i'm missing something.

Hmm, ok, my 'quick' glance over the code was too quick :) I missed
overflow encoding to ret within callbacks, sorry. But it seems that even
though they can return nonzero values they would be ignored, correct?

> 
> Thanks,
> Kurt



  reply	other threads:[~2024-02-08 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08 10:35 [PATCH net-next] net: stmmac: Simplify mtl IRQ status checking Kurt Kanzenbach
2024-02-08 12:46 ` Maciej Fijalkowski
2024-02-08 14:32   ` Kurt Kanzenbach
2024-02-08 14:52     ` Maciej Fijalkowski [this message]
2024-02-08 15:08       ` Kurt Kanzenbach
2024-02-12 12:17 ` Kurt Kanzenbach
2024-02-12 15:12   ` Jakub Kicinski
2024-02-13  9:30 ` 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=ZcTqqwmGTIEq6bfO@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joabreu@synopsys.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --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 \
    --cc=yannick.vignon@nxp.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).