From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756152AbcA3Djf (ORCPT ); Fri, 29 Jan 2016 22:39:35 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:41997 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753710AbcA3Dje (ORCPT ); Fri, 29 Jan 2016 22:39:34 -0500 Date: Fri, 29 Jan 2016 19:39:32 -0800 (PST) Message-Id: <20160129.193932.2217883845698146411.davem@davemloft.net> To: arnd@arndb.de Cc: sergei.shtylyov@cogentembedded.com, linux-arm-kernel@lists.infradead.org, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2] ipv4: ipconfig: avoid unused ic_proto_used symbol From: David Miller In-Reply-To: <2132183.67sfLfLqZb@wuerfel> References: <2132183.67sfLfLqZb@wuerfel> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 29 Jan 2016 19:39:33 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Thu, 28 Jan 2016 17:39:24 +0100 > When CONFIG_PROC_FS, CONFIG_IP_PNP_BOOTP, CONFIG_IP_PNP_DHCP and > CONFIG_IP_PNP_RARP are all disabled, we get a warning about the > ic_proto_used variable being unused: > > net/ipv4/ipconfig.c:146:12: error: 'ic_proto_used' defined but not used [-Werror=unused-variable] > > This avoids the warning, by making the definition conditional on > whether a dynamic IP configuration protocol is configured. If not, > we know that the value is always zero, so we can optimize away the > variable and all code that depends on it. > > Signed-off-by: Arnd Bergmann Applied.