netfilter: nfnetlink: silence warning if CONFIG_PROVE_RCU isn't set
authorPaul Bolle <pebolle@tiscali.nl>
Mon, 4 Mar 2013 02:45:41 +0000 (02:45 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 4 Mar 2013 13:45:36 +0000 (14:45 +0100)
commit9df9e7832391cf699abbf39fc8d95d7e78297462
tree110f1cd48ae34fb8c236f15ac58e153a5d05153a
parented018fa4dfc3d26da56b9ee7dc75e9d39a39a02b
netfilter: nfnetlink: silence warning if CONFIG_PROVE_RCU isn't set

Since commit c14b78e7decd0d1d5add6a4604feb8609fe920a9 ("netfilter:
nfnetlink: add mutex per subsystem") building nefnetlink.o without
CONFIG_PROVE_RCU set, triggers this GCC warning:
    net/netfilter/nfnetlink.c:65:22: warning: ‘nfnl_get_lock’ defined but not used [-Wunused-function]

The cause of that warning is, in short, that rcu_lockdep_assert()
compiles away if CONFIG_PROVE_RCU is not set. Silence this warning by
open coding nfnl_get_lock() in the sole place it was called, which
allows to remove that function.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nfnetlink.c