From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752425AbbJLPlU (ORCPT ); Mon, 12 Oct 2015 11:41:20 -0400 Received: from mail.us.es ([193.147.175.20]:56083 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370AbbJLPlS (ORCPT ); Mon, 12 Oct 2015 11:41:18 -0400 X-Qmail-Scanner-Diagnostics: from 127.0.0.1 by antivirus2 (envelope-from , uid 501) with qmail-scanner-2.10 (clamdscan: 0.98.7/20958. spamassassin: 3.4.0. Clear:RC:1(127.0.0.1):SA:0(-103.2/7.5):. Processed in 1.791298 secs); 12 Oct 2015 15:41:16 -0000 X-Spam-ASN: AS12715 87.216.0.0/16 X-Envelope-From: pneira@us.es Date: Mon, 12 Oct 2015 17:48:20 +0200 From: Pablo Neira Ayuso To: Nikolay Aleksandrov Cc: Arnd Bergmann , netfilter-devel@vger.kernel.org, "Eric W. Biederman" , Florian Westphal , 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 Message-ID: <20151012154820.GA23092@salvia> References: <5180534.sSnu9AX8xS@wuerfel> <561666B9.8070802@cumulusnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <561666B9.8070802@cumulusnetworks.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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 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.