diff mbox series

[net-next] xdp: Remove redundant warning

Message ID 20211027013856.1866-1-yajun.deng@linux.dev (mailing list archive)
State Accepted
Commit b859a360d88d5ad239d46978c78fe2b63dd9efe5
Delegated to: Netdev Maintainers
Headers show
Series [net-next] xdp: Remove redundant warning | expand

Checks

Context Check Description
netdev/cover_letter success Single patches do not need cover letters
netdev/fixes_present success Fixes tag not required for -next series
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 5 maintainers not CCed: yhs@fb.com songliubraving@fb.com kafai@fb.com kpsingh@kernel.org andrii@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success No Fixes tag
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/header_inline success No static functions without inline keyword in header files

Commit Message

Yajun Deng Oct. 27, 2021, 1:38 a.m. UTC
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.

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
 net/core/xdp.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jesper Dangaard Brouer Oct. 27, 2021, 6:20 a.m. UTC | #1
On 27/10/2021 03.38, Yajun Deng 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.
 >
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

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

Fixes: dce5bd6140a4 ("xdp: export xdp_rxq_info_unreg_mem_model")

> ---
>   net/core/xdp.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/net/core/xdp.c b/net/core/xdp.c
> index cc92ccb38432..5ddc29f29bad 100644
> --- a/net/core/xdp.c
> +++ b/net/core/xdp.c
> @@ -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;
>
patchwork-bot+netdevbpf@kernel.org Oct. 28, 2021, 2 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

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.
> 
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> ---
>  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!
diff mbox series

Patch

diff --git a/net/core/xdp.c b/net/core/xdp.c
index cc92ccb38432..5ddc29f29bad 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -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;