* linux-next: build warning after merge of the ipsec-next tree
@ 2020-05-11 3:03 Stephen Rothwell
2020-05-11 8:33 ` [PATCH ipsec-next] xfrm: fix unused variable warning if CONFIG_NETFILTER=n Florian Westphal
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2020-05-11 3:03 UTC (permalink / raw)
To: Steffen Klassert
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Florian Westphal
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
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")
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH ipsec-next] xfrm: fix unused variable warning if CONFIG_NETFILTER=n
2020-05-11 3:03 linux-next: build warning after merge of the ipsec-next tree Stephen Rothwell
@ 2020-05-11 8:33 ` Florian Westphal
2020-05-13 4:42 ` Steffen Klassert
0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2020-05-11 8:33 UTC (permalink / raw)
To: steffen.klassert; +Cc: netdev, Florian Westphal, Stephen Rothwell
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: 2ab6096db2f1 ("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>
---
net/ipv4/xfrm4_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c
index 502eb189d852..3cff51ba72bb 100644
--- a/net/ipv4/xfrm4_output.c
+++ b/net/ipv4/xfrm4_output.c
@@ -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);
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH ipsec-next] xfrm: fix unused variable warning if CONFIG_NETFILTER=n
2020-05-11 8:33 ` [PATCH ipsec-next] xfrm: fix unused variable warning if CONFIG_NETFILTER=n Florian Westphal
@ 2020-05-13 4:42 ` Steffen Klassert
0 siblings, 0 replies; 3+ messages in thread
From: Steffen Klassert @ 2020-05-13 4:42 UTC (permalink / raw)
To: Florian Westphal; +Cc: netdev, Stephen Rothwell
On Mon, May 11, 2020 at 10:33:42AM +0200, Florian Westphal wrote:
> 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: 2ab6096db2f1 ("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>
Applied, thanks Florian!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-13 4:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 3:03 linux-next: build warning after merge of the ipsec-next tree Stephen Rothwell
2020-05-11 8:33 ` [PATCH ipsec-next] xfrm: fix unused variable warning if CONFIG_NETFILTER=n Florian Westphal
2020-05-13 4:42 ` Steffen Klassert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.