Skip to content

Commit df7043b

Browse files
laoarummakynes
authored andcommitted
netfilter: remove unused parameters in nf_ct_l4proto_[un]register_sysctl()
These parameters aren't used now. So remove them. Signed-off-by: Yafang Shao <[email protected]> Acked-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent a504b70 commit df7043b

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

net/netfilter/nf_conntrack_proto.c

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ static struct nf_proto_net *nf_ct_l4proto_net(struct net *net,
175175

176176
static
177177
int nf_ct_l4proto_register_sysctl(struct net *net,
178-
struct nf_proto_net *pn,
179-
const struct nf_conntrack_l4proto *l4proto)
178+
struct nf_proto_net *pn)
180179
{
181180
int err = 0;
182181

@@ -198,9 +197,7 @@ int nf_ct_l4proto_register_sysctl(struct net *net,
198197
}
199198

200199
static
201-
void nf_ct_l4proto_unregister_sysctl(struct net *net,
202-
struct nf_proto_net *pn,
203-
const struct nf_conntrack_l4proto *l4proto)
200+
void nf_ct_l4proto_unregister_sysctl(struct nf_proto_net *pn)
204201
{
205202
#ifdef CONFIG_SYSCTL
206203
if (pn->ctl_table_header != NULL)
@@ -252,7 +249,7 @@ int nf_ct_l4proto_pernet_register_one(struct net *net,
252249
if (pn == NULL)
253250
goto out;
254251

255-
ret = nf_ct_l4proto_register_sysctl(net, pn, l4proto);
252+
ret = nf_ct_l4proto_register_sysctl(net, pn);
256253
if (ret < 0)
257254
goto out;
258255

@@ -296,7 +293,7 @@ void nf_ct_l4proto_pernet_unregister_one(struct net *net,
296293
return;
297294

298295
pn->users--;
299-
nf_ct_l4proto_unregister_sysctl(net, pn, l4proto);
296+
nf_ct_l4proto_unregister_sysctl(pn);
300297
}
301298
EXPORT_SYMBOL_GPL(nf_ct_l4proto_pernet_unregister_one);
302299

@@ -946,16 +943,14 @@ int nf_conntrack_proto_pernet_init(struct net *net)
946943
if (err < 0)
947944
return err;
948945
err = nf_ct_l4proto_register_sysctl(net,
949-
pn,
950-
&nf_conntrack_l4proto_generic);
946+
pn);
951947
if (err < 0)
952948
return err;
953949

954950
err = nf_ct_l4proto_pernet_register(net, builtin_l4proto,
955951
ARRAY_SIZE(builtin_l4proto));
956952
if (err < 0) {
957-
nf_ct_l4proto_unregister_sysctl(net, pn,
958-
&nf_conntrack_l4proto_generic);
953+
nf_ct_l4proto_unregister_sysctl(pn);
959954
return err;
960955
}
961956

@@ -971,9 +966,7 @@ void nf_conntrack_proto_pernet_fini(struct net *net)
971966
nf_ct_l4proto_pernet_unregister(net, builtin_l4proto,
972967
ARRAY_SIZE(builtin_l4proto));
973968
pn->users--;
974-
nf_ct_l4proto_unregister_sysctl(net,
975-
pn,
976-
&nf_conntrack_l4proto_generic);
969+
nf_ct_l4proto_unregister_sysctl(pn);
977970
}
978971

979972

0 commit comments

Comments
 (0)