diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-01-27 14:52:01 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2016-02-18 09:17:58 +0900 |
commit | f6ca9f46f6615c3a87529550058d1b468c0cad89 (patch) | |
tree | 4106943604294cdc90372de26d54c8e2b6e2b05c /net/netfilter/ipvs/ip_vs_app.c | |
parent | 2d9e9b0d05876c9e6b52cfec142e51da9b9b3f6d (diff) | |
download | linux-f6ca9f46f6615c3a87529550058d1b468c0cad89.tar.gz linux-f6ca9f46f6615c3a87529550058d1b468c0cad89.tar.bz2 linux-f6ca9f46f6615c3a87529550058d1b468c0cad89.zip |
netfilter: ipvs: avoid unused variable warnings
The proc_create() and remove_proc_entry() functions do not reference
their arguments when CONFIG_PROC_FS is disabled, so we get a couple
of warnings about unused variables in IPVS:
ipvs/ip_vs_app.c:608:14: warning: unused variable 'net' [-Wunused-variable]
ipvs/ip_vs_ctl.c:3950:14: warning: unused variable 'net' [-Wunused-variable]
ipvs/ip_vs_ctl.c:3994:14: warning: unused variable 'net' [-Wunused-variable]
This removes the local variables and instead looks them up separately
for each use, which obviously avoids the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4c50a8ce2b63 ("netfilter: ipvs: avoid unused variable warning")
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net/netfilter/ipvs/ip_vs_app.c')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_app.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c index 0328f7250693..299edc6add5a 100644 --- a/net/netfilter/ipvs/ip_vs_app.c +++ b/net/netfilter/ipvs/ip_vs_app.c @@ -605,17 +605,13 @@ static const struct file_operations ip_vs_app_fops = { int __net_init ip_vs_app_net_init(struct netns_ipvs *ipvs) { - struct net *net = ipvs->net; - INIT_LIST_HEAD(&ipvs->app_list); - proc_create("ip_vs_app", 0, net->proc_net, &ip_vs_app_fops); + proc_create("ip_vs_app", 0, ipvs->net->proc_net, &ip_vs_app_fops); return 0; } void __net_exit ip_vs_app_net_cleanup(struct netns_ipvs *ipvs) { - struct net *net = ipvs->net; - unregister_ip_vs_app(ipvs, NULL /* all */); - remove_proc_entry("ip_vs_app", net->proc_net); + remove_proc_entry("ip_vs_app", ipvs->net->proc_net); } |