[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADvbK_c8LtT1Jfbf4h1HrAC4p9wGproDgDieSV-roSWEEN=M0A@mail.gmail.com>
Date: Fri, 31 Jul 2020 15:28:26 +0800
From: Xin Long <lucien.xin@...il.com>
To: YueHaibing <yuehaibing@...wei.com>
Cc: Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
davem <davem@...emloft.net>, kuznet <kuznet@....inr.ac.ru>,
yoshfuji <yoshfuji@...ux-ipv6.org>,
Jakub Kicinski <kuba@...nel.org>,
network dev <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] ip_vti: Fix unused variable warning
On Fri, Jul 31, 2020 at 2:50 PM YueHaibing <yuehaibing@...wei.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@...wei.com>
Fixes: 55a48c7ec75a ("ip_vti: not register vti_ipip_handler twice")
Acked-by: Xin Long <lucien.xin@...il.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
>
>
Powered by blists - more mailing lists