* [PATCH] sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count
@ 2021-03-05 17:02 Denis Efremov
2021-03-05 21:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Denis Efremov @ 2021-03-05 17:02 UTC (permalink / raw)
To: David S. Miller; +Cc: Denis Efremov, Jakub Kicinski, netdev, linux-kernel
RXMAC_BC_FRM_CNT_COUNT added to mp->rx_bcasts twice in a row
in niu_xmac_interrupt(). Remove the second addition.
Signed-off-by: Denis Efremov <efremov@linux.com>
---
I don't know the code of the dirver, but this looks like a real bug.
Otherwise, it's more readable as:
mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT * 2;
drivers/net/ethernet/sun/niu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 68695d4afacd..707ccdd03b19 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -3931,8 +3931,6 @@ static void niu_xmac_interrupt(struct niu *np)
mp->rx_mcasts += RXMAC_MC_FRM_CNT_COUNT;
if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP)
mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT;
- if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP)
- mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT;
if (val & XRXMAC_STATUS_RXHIST1_CNT_EXP)
mp->rx_hist_cnt1 += RXMAC_HIST_CNT1_COUNT;
if (val & XRXMAC_STATUS_RXHIST2_CNT_EXP)
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count
2021-03-05 17:02 [PATCH] sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count Denis Efremov
@ 2021-03-05 21:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-05 21:10 UTC (permalink / raw)
To: Denis Efremov; +Cc: davem, kuba, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 5 Mar 2021 20:02:12 +0300 you wrote:
> RXMAC_BC_FRM_CNT_COUNT added to mp->rx_bcasts twice in a row
> in niu_xmac_interrupt(). Remove the second addition.
>
> Signed-off-by: Denis Efremov <efremov@linux.com>
> ---
> I don't know the code of the dirver, but this looks like a real bug.
> Otherwise, it's more readable as:
> mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT * 2;
>
> [...]
Here is the summary with links:
- sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count
https://git.kernel.org/netdev/net/c/155b23e6e534
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-05 21:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 17:02 [PATCH] sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count Denis Efremov
2021-03-05 21:10 ` patchwork-bot+netdevbpf
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).