linux-next: build warning after merge of the ipsec-next tree
Subsystems (4)
Hi all,
After merging the ipsec-next tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:
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;
| ^
Introduced by commit
2ab6096db2f1 ("xfrm: remove output_finish indirection from xfrm_state_afinfo")
Signature · 2 lines
Cheers, Stephen Rothwell
PATCH 1/1 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.
--- net/ipv4/xfrm4_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/xfrm4_output.c +1 -1
@@ -16,9 +16,9 @@static int __xfrm4_output (struct net *net,struct sock *sk,struct sk_buff *skb) { +#ifdef CONFIG_NETFILTER struct xfrm_state *x =skb_dst (skb)->xfrm; -#ifdef CONFIG_NETFILTER if (!x) {IPCB (skb)->flags |=IPSKB_REROUTED ;return dst_output (net, sk, skb);
Signature · 1 line
2.26.2
Re: [PATCH ipsec-next] xfrm: fix unused variable warning if CONFIG_NETFILTER=n
Quoted 11 lines · Florian Westphal
After recent change 'x' is only used when
CONFIG_NETFILTERis set:
net/ipv4/xfrm4_output.c: In function '__xfrm4_output':net/ipv4/xfrm4_output.c:19:21: warning: unused variable 'x' [-Wunused-variable]
19 | structxfrm_state*x = skb_dst(skb)->xfrm;Expand the
CONFIG_NETFILTERscope to avoid this.Fixes 2ab6096db2f1 ("xfrm: remove output_finish indirection from xfrm_state_afinfo")Reported-by Stephen Rothwell <[email protected]>Signed-off-by Florian Westphal <[email protected]>
Applied, thanks Florian!