Commit df7043be authored by Yafang Shao's avatar Yafang Shao Committed by Pablo Neira Ayuso

netfilter: remove unused parameters in nf_ct_l4proto_[un]register_sysctl()

These parameters aren't used now.
So remove them.
Signed-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent a504b703
...@@ -175,8 +175,7 @@ static struct nf_proto_net *nf_ct_l4proto_net(struct net *net, ...@@ -175,8 +175,7 @@ static struct nf_proto_net *nf_ct_l4proto_net(struct net *net,
static static
int nf_ct_l4proto_register_sysctl(struct net *net, int nf_ct_l4proto_register_sysctl(struct net *net,
struct nf_proto_net *pn, struct nf_proto_net *pn)
const struct nf_conntrack_l4proto *l4proto)
{ {
int err = 0; int err = 0;
...@@ -198,9 +197,7 @@ int nf_ct_l4proto_register_sysctl(struct net *net, ...@@ -198,9 +197,7 @@ int nf_ct_l4proto_register_sysctl(struct net *net,
} }
static static
void nf_ct_l4proto_unregister_sysctl(struct net *net, void nf_ct_l4proto_unregister_sysctl(struct nf_proto_net *pn)
struct nf_proto_net *pn,
const struct nf_conntrack_l4proto *l4proto)
{ {
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
if (pn->ctl_table_header != NULL) if (pn->ctl_table_header != NULL)
...@@ -252,7 +249,7 @@ int nf_ct_l4proto_pernet_register_one(struct net *net, ...@@ -252,7 +249,7 @@ int nf_ct_l4proto_pernet_register_one(struct net *net,
if (pn == NULL) if (pn == NULL)
goto out; goto out;
ret = nf_ct_l4proto_register_sysctl(net, pn, l4proto); ret = nf_ct_l4proto_register_sysctl(net, pn);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -296,7 +293,7 @@ void nf_ct_l4proto_pernet_unregister_one(struct net *net, ...@@ -296,7 +293,7 @@ void nf_ct_l4proto_pernet_unregister_one(struct net *net,
return; return;
pn->users--; pn->users--;
nf_ct_l4proto_unregister_sysctl(net, pn, l4proto); nf_ct_l4proto_unregister_sysctl(pn);
} }
EXPORT_SYMBOL_GPL(nf_ct_l4proto_pernet_unregister_one); EXPORT_SYMBOL_GPL(nf_ct_l4proto_pernet_unregister_one);
...@@ -946,16 +943,14 @@ int nf_conntrack_proto_pernet_init(struct net *net) ...@@ -946,16 +943,14 @@ int nf_conntrack_proto_pernet_init(struct net *net)
if (err < 0) if (err < 0)
return err; return err;
err = nf_ct_l4proto_register_sysctl(net, err = nf_ct_l4proto_register_sysctl(net,
pn, pn);
&nf_conntrack_l4proto_generic);
if (err < 0) if (err < 0)
return err; return err;
err = nf_ct_l4proto_pernet_register(net, builtin_l4proto, err = nf_ct_l4proto_pernet_register(net, builtin_l4proto,
ARRAY_SIZE(builtin_l4proto)); ARRAY_SIZE(builtin_l4proto));
if (err < 0) { if (err < 0) {
nf_ct_l4proto_unregister_sysctl(net, pn, nf_ct_l4proto_unregister_sysctl(pn);
&nf_conntrack_l4proto_generic);
return err; return err;
} }
...@@ -971,9 +966,7 @@ void nf_conntrack_proto_pernet_fini(struct net *net) ...@@ -971,9 +966,7 @@ void nf_conntrack_proto_pernet_fini(struct net *net)
nf_ct_l4proto_pernet_unregister(net, builtin_l4proto, nf_ct_l4proto_pernet_unregister(net, builtin_l4proto,
ARRAY_SIZE(builtin_l4proto)); ARRAY_SIZE(builtin_l4proto));
pn->users--; pn->users--;
nf_ct_l4proto_unregister_sysctl(net, nf_ct_l4proto_unregister_sysctl(pn);
pn,
&nf_conntrack_l4proto_generic);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment