[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5287B3E2.2030301@gmail.com>
Date: Sat, 16 Nov 2013 13:05:22 -0500
From: Vlad Yasevich <vyasevich@...il.com>
To: Fabio Estevam <festevam@...il.com>, davem@...emloft.net
CC: netdev@...r.kernel.org, Fabio Estevam <fabio.estevam@...escale.com>
Subject: Re: [PATCH 1/2] net: ipv6: af_inet6: Fix warning when CONFIG_SYSCTL=n
On 11/15/2013 09:52 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@...escale.com>
>
> When CONFIG_SYSCTL=n the following build warning happens:
>
> net/ipv6/af_inet6.c:710:13: warning: 'ipv6_packet_cleanup' defined but not used [-Wunused-function]
>
> ipv6_packet_cleanup() is only used when CONFIG_SYSCTL=y, so protect its
> definition with an'ifdef CONFIG_SYSCTL'.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
> ---
> net/ipv6/af_inet6.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
> index ff75313..e4ad65c 100644
> --- a/net/ipv6/af_inet6.c
> +++ b/net/ipv6/af_inet6.c
> @@ -707,10 +707,12 @@ static int __init ipv6_packet_init(void)
> return 0;
> }
>
> +#ifdef CONFIG_SYSCTL
> static void ipv6_packet_cleanup(void)
> {
> dev_remove_pack(&ipv6_packet_type);
> }
> +#endif
>
> static int __net_init ipv6_init_mibs(struct net *net)
> {
>
NACK. ipv6_packet_init and ipv6_packet_cleanup should in no way depend
on sysctl.
-vlad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists