Skip to contentSkip to conversation

xdp: Remove redundant warning

PATCH Applied Yajun Deng 3 participants 3 messages Oct 27, 2021 – Oct 28, 2021

Subsystems (4)
lore
Share & tools
lore

Yajun Deng

author
#0 lore raw

PATCH 1/1 xdp: Remove redundant warning

There is a warning in xdp_rxq_info_unreg_mem_model() when reg_state isn't equal to REG_STATE_REGISTERED, so the warning in xdp_rxq_info_unreg() is redundant.

---
 net/core/xdp.c | 2 --
 1 file changed, 2 deletions(-)
net/core/xdp.c +0 -2
index cc92ccb38432..5ddc29f29bad 100644
@@ -143,8 +143,6 @@ void xdp_rxq_info_unreg(struct xdp_rxq_info *xdp_rxq)
 	if (xdp_rxq->reg_state == REG_STATE_UNUSED)
 		return;
 
-	WARN(!(xdp_rxq->reg_state == REG_STATE_REGISTERED), "Driver BUG");
-
 	xdp_rxq_info_unreg_mem_model(xdp_rxq);
 
 	xdp_rxq->reg_state = REG_STATE_UNREGISTERED;
Signature · 1 line
2.32.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Yajun Deng

There is a warning in xdp_rxq_info_unreg_mem_model() when reg_state isn't equal to REG_STATE_REGISTERED, so the warning in xdp_rxq_info_unreg() is redundant.

I guess/wonder if we should mark this as a fix for:

Fixes dce5bd6140a4 ("xdp: export xdp_rxq_info_unreg_mem_model")
Quoted 18 lines
---
  net/core/xdp.c | 2 --
  1 file changed, 2 deletions(-)
net/core/xdp.c +0 -2
index cc92ccb38432..5ddc29f29bad 100644
@@ -143,8 +143,6 @@ void xdp_rxq_info_unreg(struct xdp_rxq_info *xdp_rxq)
  	if (xdp_rxq->reg_state == REG_STATE_UNUSED)
  		return;
 
-	WARN(!(xdp_rxq->reg_state == REG_STATE_REGISTERED), "Driver BUG");
-
  	xdp_rxq_info_unreg_mem_model(xdp_rxq);
 
  	xdp_rxq->reg_state = REG_STATE_UNREGISTERED;
#2 lore raw
In reply to Yajun Deng
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 27 Oct 2021 09:38:56 +0800 you wrote:

There is a warning in xdp_rxq_info_unreg_mem_model() when reg_state isn't equal to REG_STATE_REGISTERED, so the warning in xdp_rxq_info_unreg() is redundant.

---
 net/core/xdp.c | 2 --
 1 file changed, 2 deletions(-)

Here is the summary with links:
- [net-next] xdp: Remove redundant warning

    https://git.kernel.org/netdev/net-next/c/b859a360d88d

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html