]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: fix unused variable warning if CONFIG_NETFILTER=n
authorFlorian Westphal <fw@strlen.de>
Mon, 11 May 2020 08:33:42 +0000 (10:33 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 11 May 2020 13:12:27 +0000 (15:12 +0200)
commit5699e025ad91a89405d29cad9cb72aaacc9f6773
tree1a5a4c0983c25ccf11e89710ce9f029f44d99fe7
parentbb9801879c2215a5199a2fdc0f1f6090b2ca7965
xfrm: fix unused variable warning if CONFIG_NETFILTER=n

After recent change 'x' is only used when CONFIG_NETFILTER is set:

net/ipv4/xfrm4_output.c: In function '__xfrm4_output':
net/ipv4/xfrm4_output.c:19:21: warning: unused variable 'x' [-Wunused-variable]
   19 |  struct xfrm_state *x = skb_dst(skb)->xfrm;

Expand the CONFIG_NETFILTER scope to avoid this.

Fixes: bb9801879c22 ("xfrm: remove output_finish indirection from xfrm_state_afinfo")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/xfrm4_output.c