* [PATCH] sh_eth: fix branch prediction in sh_eth_interrupt()
@ 2016-12-29 21:07 Sergei Shtylyov
2016-12-30 3:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2016-12-29 21:07 UTC (permalink / raw)
To: netdev, linux-renesas-soc; +Cc: ben.hutchings
IIUC, likely()/unlikely() should apply to the whole *if* statement's
expression, not a part of it -- fix such expression in sh_eth_interrupt()
accordingly...
Fixes: 283e38db65e7 ("sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI handlers")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against DaveM's 'net-next.git' repo; I'm not sure if it should
be targeted to the 'net.git' repo instead...
drivers/net/ethernet/renesas/sh_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -1656,7 +1656,7 @@ static irqreturn_t sh_eth_interrupt(int
else
goto out;
- if (!likely(mdp->irq_enabled)) {
+ if (unlikely(!mdp->irq_enabled)) {
sh_eth_write(ndev, 0, EESIPR);
goto out;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sh_eth: fix branch prediction in sh_eth_interrupt()
2016-12-29 21:07 [PATCH] sh_eth: fix branch prediction in sh_eth_interrupt() Sergei Shtylyov
@ 2016-12-30 3:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-12-30 3:16 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-renesas-soc, ben.hutchings
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Fri, 30 Dec 2016 00:07:38 +0300
> IIUC, likely()/unlikely() should apply to the whole *if* statement's
> expression, not a part of it -- fix such expression in sh_eth_interrupt()
> accordingly...
>
> Fixes: 283e38db65e7 ("sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI handlers")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against DaveM's 'net-next.git' repo; I'm not sure if it should
> be targeted to the 'net.git' repo instead...
I decided to apply this to 'net', thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-30 3:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-29 21:07 [PATCH] sh_eth: fix branch prediction in sh_eth_interrupt() Sergei Shtylyov
2016-12-30 3:16 ` David Miller
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).