From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932637AbbJPQi0 (ORCPT ); Fri, 16 Oct 2015 12:38:26 -0400 Received: from mail.us.es ([193.147.175.20]:35078 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753728AbbJPQiY (ORCPT ); Fri, 16 Oct 2015 12:38:24 -0400 X-Qmail-Scanner-Diagnostics: from 127.0.0.1 by antivirus5 (envelope-from , uid 501) with qmail-scanner-2.10 (clamdscan: 0.98.7/20973. spamassassin: 3.4.0. Clear:RC:1(127.0.0.1):SA:0(-103.2/7.5):. Processed in 1.785076 secs); 16 Oct 2015 16:38:23 -0000 X-Spam-ASN: AS12715 87.216.0.0/16 X-Envelope-From: pneira@us.es Date: Fri, 16 Oct 2015 18:45:27 +0200 From: Pablo Neira Ayuso To: Arnd Bergmann Cc: "Eric W. Biederman" , Patrick McHardy , Jozsef Kadlecsik , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH v2] netfilter: turn NF_HOOK into an inline function Message-ID: <20151016164527.GA3601@salvia> References: <7665226.mEs2QJDTOT@wuerfel> <87zizryjzs.fsf@x220.int.ebiederm.org> <5713169.GvahoqQ9XY@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5713169.GvahoqQ9XY@wuerfel> 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 Fri, Oct 09, 2015 at 08:45:42PM +0200, Arnd Bergmann wrote: > A recent change to the dst_output handling caused a new warning > when the call to NF_HOOK() is the only used of a local variable > passed as 'dev', and CONFIG_NETFILTER is disabled: > > net/ipv6/ip6_output.c: In function 'ip6_output': > net/ipv6/ip6_output.c:135:21: warning: unused variable 'dev' [-Wunused-variable] > > The reason for this is that the NF_HOOK macro in this case does > not reference the variable at all, and the call to dev_net(dev) > got removed from the ip6_output function. To avoid that warning now > and in the future, this changes the macro into an equivalent > inline function, which tells the compiler that the variable is > passed correctly but still unused. > > The dn_forward function apparently had the same problem in > the past and added a local workaround that no longer works > with the inline function. In order to avoid a regression, we > have to also remove the #ifdef from decnet in the same patch. Applied, thanks.