netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: Fabio Estevam <festevam@gmail.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH 1/2] net: ipv6: af_inet6: Fix warning when CONFIG_SYSCTL=n
Date: Sat, 16 Nov 2013 13:05:22 -0500	[thread overview]
Message-ID: <5287B3E2.2030301@gmail.com> (raw)
In-Reply-To: <1384570328-21666-1-git-send-email-festevam@gmail.com>

On 11/15/2013 09:52 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.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@freescale.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

  parent reply	other threads:[~2013-11-16 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-16  2:52 [PATCH 1/2] net: ipv6: af_inet6: Fix warning when CONFIG_SYSCTL=n Fabio Estevam
2013-11-16  2:52 ` [PATCH 2/2] net: ipv6: ndisc: " Fabio Estevam
2013-11-18 19:49   ` David Miller
2013-11-16 18:05 ` Vlad Yasevich [this message]
2013-11-16 18:22   ` [PATCH 1/2] net: ipv6: af_inet6: " Vlad Yasevich
2013-11-16 18:26   ` Hannes Frederic Sowa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5287B3E2.2030301@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).