Skip to content

Commit

Permalink
net_sched: remove unused parameter from act cleanup ops
Browse files Browse the repository at this point in the history
No one actually uses it.

Cc: Jiri Pirko <[email protected]>
Cc: Jamal Hadi Salim <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
congwang authored and davem330 committed Dec 5, 2017
1 parent 8bf5438 commit 9a63b25
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion include/net/act_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct tc_action_ops {
int (*act)(struct sk_buff *, const struct tc_action *,
struct tcf_result *);
int (*dump)(struct sk_buff *, struct tc_action *, int, int);
void (*cleanup)(struct tc_action *, int bind);
void (*cleanup)(struct tc_action *);
int (*lookup)(struct net *, struct tc_action **, u32);
int (*init)(struct net *net, struct nlattr *nla,
struct nlattr *est, struct tc_action **act, int ovr,
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int __tcf_idr_release(struct tc_action *p, bool bind, bool strict)
p->tcfa_refcnt--;
if (p->tcfa_bindcnt <= 0 && p->tcfa_refcnt <= 0) {
if (p->ops->cleanup)
p->ops->cleanup(p, bind);
p->ops->cleanup(p);
tcf_idr_remove(p->idrinfo, p);
ret = ACT_P_DELETED;
}
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ static int tcf_bpf_init(struct net *net, struct nlattr *nla,
return ret;
}

static void tcf_bpf_cleanup(struct tc_action *act, int bind)
static void tcf_bpf_cleanup(struct tc_action *act)
{
struct tcf_bpf_cfg tmp;

Expand Down
10 changes: 5 additions & 5 deletions net/sched/act_ife.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ static int dump_metalist(struct sk_buff *skb, struct tcf_ife_info *ife)
}

/* under ife->tcf_lock */
static void _tcf_ife_cleanup(struct tc_action *a, int bind)
static void _tcf_ife_cleanup(struct tc_action *a)
{
struct tcf_ife_info *ife = to_ife(a);
struct tcf_meta_info *e, *n;
Expand All @@ -405,13 +405,13 @@ static void _tcf_ife_cleanup(struct tc_action *a, int bind)
}
}

static void tcf_ife_cleanup(struct tc_action *a, int bind)
static void tcf_ife_cleanup(struct tc_action *a)
{
struct tcf_ife_info *ife = to_ife(a);
struct tcf_ife_params *p;

spin_lock_bh(&ife->tcf_lock);
_tcf_ife_cleanup(a, bind);
_tcf_ife_cleanup(a);
spin_unlock_bh(&ife->tcf_lock);

p = rcu_dereference_protected(ife->params, 1);
Expand Down Expand Up @@ -546,7 +546,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
if (exists)
tcf_idr_release(*a, bind);
if (ret == ACT_P_CREATED)
_tcf_ife_cleanup(*a, bind);
_tcf_ife_cleanup(*a);

if (exists)
spin_unlock_bh(&ife->tcf_lock);
Expand All @@ -567,7 +567,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
err = use_all_metadata(ife);
if (err) {
if (ret == ACT_P_CREATED)
_tcf_ife_cleanup(*a, bind);
_tcf_ife_cleanup(*a);

if (exists)
spin_unlock_bh(&ife->tcf_lock);
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_ipt.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void ipt_destroy_target(struct xt_entry_target *t)
module_put(par.target->me);
}

static void tcf_ipt_release(struct tc_action *a, int bind)
static void tcf_ipt_release(struct tc_action *a)
{
struct tcf_ipt *ipt = to_ipt(a);
ipt_destroy_target(ipt->tcfi_t);
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_mirred.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static bool tcf_mirred_act_wants_ingress(int action)
}
}

static void tcf_mirred_release(struct tc_action *a, int bind)
static void tcf_mirred_release(struct tc_action *a)
{
struct tcf_mirred *m = to_mirred(a);
struct net_device *dev;
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_pedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,
return ret;
}

static void tcf_pedit_cleanup(struct tc_action *a, int bind)
static void tcf_pedit_cleanup(struct tc_action *a)
{
struct tcf_pedit *p = to_pedit(a);
struct tc_pedit_key *keys = p->tcfp_keys;
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,
return ret;
}

static void tcf_sample_cleanup(struct tc_action *a, int bind)
static void tcf_sample_cleanup(struct tc_action *a)
{
struct tcf_sample *s = to_sample(a);
struct psample_group *psample_group;
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static int tcf_simp(struct sk_buff *skb, const struct tc_action *a,
return d->tcf_action;
}

static void tcf_simp_release(struct tc_action *a, int bind)
static void tcf_simp_release(struct tc_action *a)
{
struct tcf_defact *d = to_defact(a);
kfree(d->tcfd_defdata);
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_skbmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int tcf_skbmod_init(struct net *net, struct nlattr *nla,
return ret;
}

static void tcf_skbmod_cleanup(struct tc_action *a, int bind)
static void tcf_skbmod_cleanup(struct tc_action *a)
{
struct tcf_skbmod *d = to_skbmod(a);
struct tcf_skbmod_params *p;
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_tunnel_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla,
return ret;
}

static void tunnel_key_release(struct tc_action *a, int bind)
static void tunnel_key_release(struct tc_action *a)
{
struct tcf_tunnel_key *t = to_tunnel_key(a);
struct tcf_tunnel_key_params *params;
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static int tcf_vlan_init(struct net *net, struct nlattr *nla,
return ret;
}

static void tcf_vlan_cleanup(struct tc_action *a, int bind)
static void tcf_vlan_cleanup(struct tc_action *a)
{
struct tcf_vlan *v = to_vlan(a);
struct tcf_vlan_params *p;
Expand Down

0 comments on commit 9a63b25

Please sign in to comment.