diff mbox series

[net-next,v2] net/sched: cls_api: remove redundant 0 check in tcf_qevent_init()

Message ID 20220901011617.14105-1-shaozhengchao@huawei.com (mailing list archive)
State Accepted
Commit 2e5fb3223261366d1673c3827190c85a74b1aa56
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] net/sched: cls_api: remove redundant 0 check in tcf_qevent_init() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 5 this patch: 5
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

shaozhengchao Sept. 1, 2022, 1:16 a.m. UTC
tcf_qevent_parse_block_index() never returns a zero block_index.
Therefore, it is unnecessary to check the value of block_index in
tcf_qevent_init().

Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
 net/sched/cls_api.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 3, 2022, 4:30 a.m. UTC | #1
Hello:

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

On Thu, 1 Sep 2022 09:16:17 +0800 you wrote:
> tcf_qevent_parse_block_index() never returns a zero block_index.
> Therefore, it is unnecessary to check the value of block_index in
> tcf_qevent_init().
> 
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
>  net/sched/cls_api.c | 3 ---
>  1 file changed, 3 deletions(-)

Here is the summary with links:
  - [net-next,v2] net/sched: cls_api: remove redundant 0 check in tcf_qevent_init()
    https://git.kernel.org/netdev/net-next/c/2e5fb3223261

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 1ebab4b11262..5d0d57dc5cb7 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3629,9 +3629,6 @@  int tcf_qevent_init(struct tcf_qevent *qe, struct Qdisc *sch,
 	if (err)
 		return err;
 
-	if (!block_index)
-		return 0;
-
 	qe->info.binder_type = binder_type;
 	qe->info.chain_head_change = tcf_chain_head_change_dflt;
 	qe->info.chain_head_change_priv = &qe->filter_chain;