summaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-10-09 20:45:42 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-10-16 18:45:36 +0200
commit008027c31d57a22bd80dda5acc95b037634eee0f (patch)
treef28ab648fda1217f6a9ad14d13ced16bbcd7dc42 /net/decnet
parentnetfilter: nf_queue: remove rcu_read_lock calls (diff)
downloadlinux-008027c31d57a22bd80dda5acc95b037634eee0f.tar.xz
linux-008027c31d57a22bd80dda5acc95b037634eee0f.zip
netfilter: turn NF_HOOK into an inline function
A recent change to the dst_output handling caused a new warning when the call to NF_HOOK() is the only used of a local variable passed as 'dev', and CONFIG_NETFILTER is disabled: net/ipv6/ip6_output.c: In function 'ip6_output': net/ipv6/ip6_output.c:135:21: warning: unused variable 'dev' [-Wunused-variable] The reason for this is that the NF_HOOK macro in this case does not reference the variable at all, and the call to dev_net(dev) got removed from the ip6_output function. To avoid that warning now and in the future, this changes the macro into an equivalent inline function, which tells the compiler that the variable is passed correctly but still unused. The dn_forward function apparently had the same problem in the past and added a local workaround that no longer works with the inline function. In order to avoid a regression, we have to also remove the #ifdef from decnet in the same patch. Fixes: ede2059dbaf9 ("dst: Pass net into dst->output") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_route.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index e930321e2c1d..0c491fc0e254 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -789,9 +789,7 @@ static int dn_forward(struct sk_buff *skb)
struct dn_dev *dn_db = rcu_dereference(dst->dev->dn_ptr);
struct dn_route *rt;
int header_len;
-#ifdef CONFIG_NETFILTER
struct net_device *dev = skb->dev;
-#endif
if (skb->pkt_type != PACKET_HOST)
goto drop;