lkml.org 
[lkml]   [2022]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next,v2] net/sched: cls_api: remove redundant 0 check in tcf_qevent_init()
Date
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(-)

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;
--
2.17.1
\
 
 \ /
  Last update: 2022-09-01 03:16    [W:0.038 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site