Received: by 10.223.185.116 with SMTP id b49csp1122658wrg; Fri, 23 Feb 2018 12:19:15 -0800 (PST) X-Google-Smtp-Source: AH8x2242EonDayUIkmpJlBUTF0svWtrWyfNwlxNtyF3zwZj/DNl4dH/iuOScpY4MDX56fTEfXhgl X-Received: by 10.98.72.204 with SMTP id q73mr2921840pfi.48.1519417155559; Fri, 23 Feb 2018 12:19:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417155; cv=none; d=google.com; s=arc-20160816; b=Q14SaMdaF+0B3HJtoF7AXbd4ZeK+KLqw5FqgxgAAWhBd5giCigfvRO+trpAjm8nuW2 XUzUsi97pzegeT3YXn8klAgvl7zXpGwHEQ9682Xb0uW0dTQZcm1DNPyTyDUKPH/YgVZ5 YTuhA0DXFR3p3gmiLcdkVkCteHKfvXNbHKEYHVSTeFRVNi0WD0k05vwQhV5okudwFSTv vW5v03B9esBxPkYxTf/m7+r4WJeqYKjWGBYnIODHLzQmGnplPDibdR8+oLsy0tTT1efc YGNdlPiO+xrL2Xv1SEdC1nU29TAp5O5PyIP21jz45WI8XqROjtx4tOpi2vRamlmGUceG 9IAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=d3MEDZwMUmYnv/E96DFeC3d/3+QNtWdalrf1QzSusgQ=; b=bDrwugA0YUhYjywXILS2GKZPvngRpBZtFC57Xpt8+mmjVUChku5H+glEti3+4BlgI8 6EC+rw38lcoZ8kmr2nUV7cQ4ua/j1kwyVBSHJd2Nf2XfFX8bASAS3gOaWTO/yrT65aMm oGk1MS4Qb4gl4Jtow/ilPNih1XANL7dOP9RB+qpbOIOh2DOcnT4aKdiKPrptrhahpp8y JVACBInJpaOVCoD7Dx8YhQX16TGCEVZ4u05O6tH588kzrg4+kqdk2UYH0R3eY65jqIYu 3UUabyDQ5rxmj0noybNTvEpgGCn2GBGP2XlX1LOC6n30Cm4jDaTFiYi3Q6T6PUbPFS7+ Bs+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q69si1888476pgq.100.2018.02.23.12.19.00; Fri, 23 Feb 2018 12:19:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932551AbeBWSkB (ORCPT + 99 others); Fri, 23 Feb 2018 13:40:01 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39874 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754298AbeBWSj6 (ORCPT ); Fri, 23 Feb 2018 13:39:58 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D5A8511BE; Fri, 23 Feb 2018 18:39:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "David S. Miller" Subject: [PATCH 4.4 118/193] ipv4: ipconfig: avoid unused ic_proto_used symbol Date: Fri, 23 Feb 2018 19:25:51 +0100 Message-Id: <20180223170344.332616740@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 52b79e2bdf92b07b37c805c50811eaf69a33683d upstream. 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/ipconfig.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -152,7 +152,11 @@ static char dhcp_client_identifier[253] /* Persistent data: */ +#ifdef IPCONFIG_DYNAMIC static int ic_proto_used; /* Protocol used, if any */ +#else +#define ic_proto_used 0 +#endif static __be32 ic_nameservers[CONF_NAMESERVERS_MAX]; /* DNS Server IP addresses */ static u8 ic_domain[64]; /* DNS (not NIS) domain name */