aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_simple.c
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2018-08-19 15:22:06 -0400
committerDavid S. Miller <davem@davemloft.net>2018-08-21 15:45:44 -0400
commit97a3f84f2c84f81b859aedd2c186df09c2ee21a6 (patch)
tree94b69a5b9f938534b7ae0733cea74712c3f15472 /net/sched/act_simple.c
parentedfaf94fa705181eeb2fe0c36c0b902dedbd40f1 (diff)
net_sched: remove unnecessary ops->delete()
All ops->delete() wants is getting the tn->idrinfo, but we already have tc_action before calling ops->delete(), and tc_action has a pointer ->idrinfo. More importantly, each type of action does the same thing, that is, just calling tcf_idr_delete_index(). So it can be just removed. Fixes: b409074e6693 ("net: sched: add 'delete' function to action ops") Cc: Jiri Pirko <jiri@mellanox.com> Cc: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_simple.c')
-rw-r--r--net/sched/act_simple.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index e616523ba3c1..52400d49f81f 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -196,13 +196,6 @@ static int tcf_simp_search(struct net *net, struct tc_action **a, u32 index,
196 return tcf_idr_search(tn, a, index); 196 return tcf_idr_search(tn, a, index);
197} 197}
198 198
199static int tcf_simp_delete(struct net *net, u32 index)
200{
201 struct tc_action_net *tn = net_generic(net, simp_net_id);
202
203 return tcf_idr_delete_index(tn, index);
204}
205
206static struct tc_action_ops act_simp_ops = { 199static struct tc_action_ops act_simp_ops = {
207 .kind = "simple", 200 .kind = "simple",
208 .type = TCA_ACT_SIMP, 201 .type = TCA_ACT_SIMP,
@@ -213,7 +206,6 @@ static struct tc_action_ops act_simp_ops = {
213 .init = tcf_simp_init, 206 .init = tcf_simp_init,
214 .walk = tcf_simp_walker, 207 .walk = tcf_simp_walker,
215 .lookup = tcf_simp_search, 208 .lookup = tcf_simp_search,
216 .delete = tcf_simp_delete,
217 .size = sizeof(struct tcf_defact), 209 .size = sizeof(struct tcf_defact),
218}; 210};
219 211