From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757376AbbJHMvL (ORCPT ); Thu, 8 Oct 2015 08:51:11 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:38078 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755414AbbJHMvI (ORCPT ); Thu, 8 Oct 2015 08:51:08 -0400 Subject: Re: [PATCH v2] bridge/netfilter: avoid unused label warning To: Arnd Bergmann , Pablo Neira Ayuso , netfilter-devel@vger.kernel.org References: <5180534.sSnu9AX8xS@wuerfel> Cc: "Eric W. Biederman" , Florian Westphal , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Nikolay Aleksandrov X-Enigmail-Draft-Status: N1110 Message-ID: <561666B9.8070802@cumulusnetworks.com> Date: Thu, 8 Oct 2015 14:51:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5180534.sSnu9AX8xS@wuerfel> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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