netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	netfilter-devel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Florian Westphal <fw@strlen.de>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] bridge/netfilter: avoid unused label warning
Date: Mon, 12 Oct 2015 17:48:20 +0200	[thread overview]
Message-ID: <20151012154820.GA23092@salvia> (raw)
In-Reply-To: <561666B9.8070802@cumulusnetworks.com>

On Thu, Oct 08, 2015 at 02:51:05PM +0200, Nikolay Aleksandrov wrote:
> On 10/08/2015 02:30 PM, Arnd Bergmann wrote:
> > With the ARM mini2440_defconfig, the bridge netfilter code gets
> > built with both CONFIG_NF_DEFRAG_IPV4 and CONFIG_NF_DEFRAG_IPV6
> > disabled, which leads to a harmless gcc warning:
> > 
> > net/bridge/br_netfilter_hooks.c: In function 'br_nf_dev_queue_xmit':
> > net/bridge/br_netfilter_hooks.c:792:2: warning: label 'drop' defined but not used [-Wunused-label]
> > 
> > This gets rid of the warning by cleaning up the code to avoid
> > the respective #ifdefs causing this problem, and replacing them
> > with if(IS_ENABLED()) checks. I have verified that the resulting
> > object code is unchanged, and an additional advantage is that
> > we now get compile coverage of the unused functions in more
> > configurations.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: dd302b59bde0 ("netfilter: bridge: don't leak skb in error paths")
> > ---
> > Version 2:
> > 
> > Rebased to git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
> > 
> 
> Looks good to me,
> 
> Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

Nice that we got rid of that many ifdefs. Thanks!

BTW, just for the record in case someone search for this on the
Internet: I have renamed the subject to "netfilter: bridge: avoid
unused label warning" for consistency with other existing subject
lines in the repo.

      reply	other threads:[~2015-10-12 15:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 12:30 [PATCH v2] bridge/netfilter: avoid unused label warning Arnd Bergmann
2015-10-08 12:51 ` Nikolay Aleksandrov
2015-10-12 15:48   ` Pablo Neira Ayuso [this message]

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=20151012154820.GA23092@salvia \
    --to=pablo@netfilter.org \
    --cc=arnd@arndb.de \
    --cc=ebiederm@xmission.com \
    --cc=fw@strlen.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    /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).