mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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: b409074e66
("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>
This commit is contained in:
parent
edfaf94fa7
commit
97a3f84f2c
18 changed files with 7 additions and 146 deletions
|
@ -232,13 +232,6 @@ static int tcf_sample_search(struct net *net, struct tc_action **a, u32 index,
|
|||
return tcf_idr_search(tn, a, index);
|
||||
}
|
||||
|
||||
static int tcf_sample_delete(struct net *net, u32 index)
|
||||
{
|
||||
struct tc_action_net *tn = net_generic(net, sample_net_id);
|
||||
|
||||
return tcf_idr_delete_index(tn, index);
|
||||
}
|
||||
|
||||
static struct tc_action_ops act_sample_ops = {
|
||||
.kind = "sample",
|
||||
.type = TCA_ACT_SAMPLE,
|
||||
|
@ -249,7 +242,6 @@ static struct tc_action_ops act_sample_ops = {
|
|||
.cleanup = tcf_sample_cleanup,
|
||||
.walk = tcf_sample_walker,
|
||||
.lookup = tcf_sample_search,
|
||||
.delete = tcf_sample_delete,
|
||||
.size = sizeof(struct tcf_sample),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue