netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ip_vti: Fix unused variable warning
@ 2020-07-31  6:49 YueHaibing
  2020-07-31  7:28 ` Xin Long
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: YueHaibing @ 2020-07-31  6:49 UTC (permalink / raw)
  To: steffen.klassert, herbert, davem, kuznet, yoshfuji, kuba, lucien.xin
  Cc: netdev, linux-kernel, YueHaibing

If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n,

net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/ipv4/ip_vti.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
index 49daaed89764..f687abb069fa 100644
--- a/net/ipv4/ip_vti.c
+++ b/net/ipv4/ip_vti.c
@@ -490,6 +490,7 @@ static struct xfrm_tunnel vti_ipip_handler __read_mostly = {
 	.priority	=	0,
 };
 
+#if IS_ENABLED(CONFIG_IPV6)
 static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
 	.handler	=	vti_rcv_tunnel,
 	.cb_handler	=	vti_rcv_cb,
@@ -497,6 +498,7 @@ static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
 	.priority	=	0,
 };
 #endif
+#endif
 
 static int __net_init vti_init_net(struct net *net)
 {
-- 
2.17.1



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

* Re: [PATCH net-next] ip_vti: Fix unused variable warning
  2020-07-31  6:49 [PATCH net-next] ip_vti: Fix unused variable warning YueHaibing
@ 2020-07-31  7:28 ` Xin Long
  2020-08-03 22:13 ` David Miller
  2020-08-10 11:04 ` Steffen Klassert
  2 siblings, 0 replies; 6+ messages in thread
From: Xin Long @ 2020-07-31  7:28 UTC (permalink / raw)
  To: YueHaibing
  Cc: Steffen Klassert, Herbert Xu, davem, kuznet, yoshfuji,
	Jakub Kicinski, network dev, LKML

On Fri, Jul 31, 2020 at 2:50 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n,
>
> net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Fixes: 55a48c7ec75a ("ip_vti: not register vti_ipip_handler twice")
Acked-by: Xin Long <lucien.xin@gmail.com>

> ---
>  net/ipv4/ip_vti.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c
> index 49daaed89764..f687abb069fa 100644
> --- a/net/ipv4/ip_vti.c
> +++ b/net/ipv4/ip_vti.c
> @@ -490,6 +490,7 @@ static struct xfrm_tunnel vti_ipip_handler __read_mostly = {
>         .priority       =       0,
>  };
>
> +#if IS_ENABLED(CONFIG_IPV6)
>  static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
>         .handler        =       vti_rcv_tunnel,
>         .cb_handler     =       vti_rcv_cb,
> @@ -497,6 +498,7 @@ static struct xfrm_tunnel vti_ipip6_handler __read_mostly = {
>         .priority       =       0,
>  };
>  #endif
> +#endif
>
>  static int __net_init vti_init_net(struct net *net)
>  {
> --
> 2.17.1
>
>

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

* Re: [PATCH net-next] ip_vti: Fix unused variable warning
  2020-07-31  6:49 [PATCH net-next] ip_vti: Fix unused variable warning YueHaibing
  2020-07-31  7:28 ` Xin Long
@ 2020-08-03 22:13 ` David Miller
  2020-08-04  5:53   ` Steffen Klassert
  2020-08-10 11:04 ` Steffen Klassert
  2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2020-08-03 22:13 UTC (permalink / raw)
  To: yuehaibing
  Cc: steffen.klassert, herbert, kuznet, yoshfuji, kuba, lucien.xin,
	netdev, linux-kernel

From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 31 Jul 2020 14:49:52 +0800

> If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n,
> 
> net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Steffen, please pick this up if you haven't already.

Thank you.

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

* Re: [PATCH net-next] ip_vti: Fix unused variable warning
  2020-08-03 22:13 ` David Miller
@ 2020-08-04  5:53   ` Steffen Klassert
  2020-08-05 19:21     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Steffen Klassert @ 2020-08-04  5:53 UTC (permalink / raw)
  To: David Miller
  Cc: yuehaibing, herbert, kuznet, yoshfuji, kuba, lucien.xin, netdev,
	linux-kernel

On Mon, Aug 03, 2020 at 03:13:49PM -0700, David Miller wrote:
> From: YueHaibing <yuehaibing@huawei.com>
> Date: Fri, 31 Jul 2020 14:49:52 +0800
> 
> > If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n,
> > 
> > net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable]
> > 
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Steffen, please pick this up if you haven't already.

I still have this one in my queue, it came in after
I did the the ipsec-next pull request last week.
Now the 5.8 release was inbetween, so it should go
to the ipsec tree. I'm waiting until I can backmerge
the offending patch into the ipsec tree and apply it
then.

Alternatively to speed things up, you can take it
directly into net-next before you do the pull request
to Linus. In case you prefer that:

Acked-by: Steffen Klassert <steffen.klassert@secunet.com>

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

* Re: [PATCH net-next] ip_vti: Fix unused variable warning
  2020-08-04  5:53   ` Steffen Klassert
@ 2020-08-05 19:21     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-08-05 19:21 UTC (permalink / raw)
  To: steffen.klassert
  Cc: yuehaibing, herbert, kuznet, yoshfuji, kuba, lucien.xin, netdev,
	linux-kernel

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Tue, 4 Aug 2020 07:53:10 +0200

> On Mon, Aug 03, 2020 at 03:13:49PM -0700, David Miller wrote:
>> From: YueHaibing <yuehaibing@huawei.com>
>> Date: Fri, 31 Jul 2020 14:49:52 +0800
>> 
>> > If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n,
>> > 
>> > net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable]
>> > 
>> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> 
>> Steffen, please pick this up if you haven't already.
> 
> I still have this one in my queue, it came in after
> I did the the ipsec-next pull request last week.
> Now the 5.8 release was inbetween, so it should go
> to the ipsec tree. I'm waiting until I can backmerge
> the offending patch into the ipsec tree and apply it
> then.

I can wait until you can get it to me via your tree, no problem.

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

* Re: [PATCH net-next] ip_vti: Fix unused variable warning
  2020-07-31  6:49 [PATCH net-next] ip_vti: Fix unused variable warning YueHaibing
  2020-07-31  7:28 ` Xin Long
  2020-08-03 22:13 ` David Miller
@ 2020-08-10 11:04 ` Steffen Klassert
  2 siblings, 0 replies; 6+ messages in thread
From: Steffen Klassert @ 2020-08-10 11:04 UTC (permalink / raw)
  To: YueHaibing
  Cc: herbert, davem, kuznet, yoshfuji, kuba, lucien.xin, netdev, linux-kernel

On Fri, Jul 31, 2020 at 02:49:52PM +0800, YueHaibing wrote:
> If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n,
> 
> net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Now applied to the ipsec tree, thanks!

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

end of thread, other threads:[~2020-08-10 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31  6:49 [PATCH net-next] ip_vti: Fix unused variable warning YueHaibing
2020-07-31  7:28 ` Xin Long
2020-08-03 22:13 ` David Miller
2020-08-04  5:53   ` Steffen Klassert
2020-08-05 19:21     ` David Miller
2020-08-10 11:04 ` Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).