All of lore.kernel.org
 help / color / mirror / Atom feed
* 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; 4+ 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] 4+ 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; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread

* linux-next: build warning after merge of the ipsec-next tree
@ 2021-06-15  7:58 Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2021-06-15  7:58 UTC (permalink / raw)
  To: Steffen Klassert
  Cc: Florian Westphal, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

Hi all,

After merging the ipsec-next tree, today's linux-next build (powerpc
pseries_le_defconfig) produced this warning:

net/xfrm/xfrm_output.c:140:12: warning: 'xfrm6_hdr_offset' defined but not used [-Wunused-function]
  140 | static int xfrm6_hdr_offset(struct xfrm_state *x, struct sk_buff *skb, u8 **prevhdr)
      |            ^~~~~~~~~~~~~~~~

Introduced by commit

  9acf4d3b9ec1 ("xfrm: ipv6: add xfrm6_hdr_offset helper")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-15  7:58 UTC | newest]

Thread overview: 4+ 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
2021-06-15  7:58 linux-next: build warning after merge of the ipsec-next tree Stephen Rothwell

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.