[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131116182600.GB16541@order.stressinduktion.org>
Date: Sat, 16 Nov 2013 19:26:00 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: Vlad Yasevich <vyasevich@...il.com>
Cc: Fabio Estevam <festevam@...il.com>, davem@...emloft.net,
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 Sat, Nov 16, 2013 at 01:05:22PM -0500, Vlad Yasevich wrote:
> 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.
It is only used in an error path if CONFIG_SYSCTL=y. I agree it does
look a bit odd.
Maybe just add __maybe_unused to ipv6_packet_cleanup?
--
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