]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ipvs: Remove possibly unused variables from ip_vs_conn_net_{init,cleanup}
authorSimon Horman <horms@verge.net.au>
Tue, 6 Oct 2015 08:09:52 +0000 (17:09 +0900)
committerSimon Horman <horms@verge.net.au>
Wed, 7 Oct 2015 01:12:00 +0000 (10:12 +0900)
commit92240e8dc0d1a94ea3dde7cb19aace113dcc6cb9
tree8a5db957bde739b4a337d2c8faa7a945f99aabe2
parented1c9f0e78b3b360ade4fb838a6099d643f3cd04
ipvs: Remove possibly unused variables from ip_vs_conn_net_{init,cleanup}

If CONFIG_PROC_FS is undefined then the arguments of proc_create()
and remove_proc_entry() are unused. As a result the net variables of
ip_vs_conn_net_{init,cleanup} are unused.

net/netfilter/ipvs//ip_vs_conn.c: In function ‘ip_vs_conn_net_init’:
net/netfilter/ipvs//ip_vs_conn.c:1350:14: warning: unused variable ‘net’ [-Wunused-variable]
net/netfilter/ipvs//ip_vs_conn.c: In function ‘ip_vs_conn_net_cleanup’:
net/netfilter/ipvs//ip_vs_conn.c:1361:14: warning: unused variable ‘net’ [-Wunused-variable]
...

Resolve this by dereferencing net as needed rather than storing it
in a variable.

Fixes: 3d99376689ee ("ipvs: Pass ipvs not net into ip_vs_control_net_(init|cleanup)")
Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Julian Anastasov <ja@ssi.bg>
net/netfilter/ipvs/ip_vs_conn.c