From patchwork Thu Mar 1 15:27:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130292 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2952768edc; Thu, 1 Mar 2018 07:38:49 -0800 (PST) X-Google-Smtp-Source: AG47ELvydu9pADKk7v0dnQViqcI4N1VrfOQPxmxdsLGnhlwDMtfGudrbiALpYS/9YXyEClEN1PsW X-Received: by 2002:a17:902:6c4c:: with SMTP id h12-v6mr2261534pln.101.1519918729262; Thu, 01 Mar 2018 07:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918729; cv=none; d=google.com; s=arc-20160816; b=lnwZTT27FkOqlCJ7vw6fbPx15EIjYXEtp/x5G2158ZphRPXgTddsDXOBpVzhakQ5kE DVRfIzcwxfvWHutoBdLP7uzaKdvDtSbDYB63uzYhV00OyMjIjNs3wvgU/X0uUO5BeQoX fSy9s3yNyZoYJpcB2V9rEZjzXvPpLimur7SAMCMdQyFYRs4N56OZDbFKYYU23LGSuOxK 278HQa/Ukmre6oym2fpK9cYBt+VehL2ZX2RimMxpDfKoym8Q0x9tdQCa0rpxtQclRJUa ehVs0nqql7XuaOi32WNa/srabth0dbyiwixvKMlMGcJgwp8cxLRqF6cQqpvGVeUK1BB+ reIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Pqoh52hC+JKSkGcxxgqcti0Mm+B2rmfKO3Jm3qzA9NM=; b=PwPxnfhuiNhrA2pBZRd/GXw9n4d8U6UHtZRHSnLVYyspDRA3JW/hpNHz61kqjvguBx 7xD+ZhZChGEx3QeqYUW/8hZ/ZiEwOWAfdcqYfTF2g3lZ5i/FJMiF+kf2wjNHP5R5mdle ZRWXCH3mxenqyjrLl6goqbT7pRhMFapJ4Zn/4WSmCcISba6UcFPt/7X3dNdN956XN2/T KM1PV8HNOgXvI6sFh8DAJY4bA2DK5YpRTCA2PDtM9I2vk7WrYUuwsmuXdh/PgSHHroP3 KsMkKGJ6alAeC8K1p8b6Vy2aAmNCFb1h+ullrEsffWnzhCXooKvlamjAvm31CJxZFqqu 2HfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=WSGgaxfG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si2586092pgs.318.2018.03.01.07.38.49; Thu, 01 Mar 2018 07:38:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=WSGgaxfG; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032572AbeCAPiq (ORCPT + 10 others); Thu, 1 Mar 2018 10:38:46 -0500 Received: from mail-cys01nam02on0109.outbound.protection.outlook.com ([104.47.37.109]:53120 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032564AbeCAPif (ORCPT ); Thu, 1 Mar 2018 10:38:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Pqoh52hC+JKSkGcxxgqcti0Mm+B2rmfKO3Jm3qzA9NM=; b=WSGgaxfG/Pc7tV2Oj5zLlOXgVQiVXAhE5cXigm1WMpW22DHUxQexlQNfCDN7XQclzDfWorfHZEtVxwUGrqCpLDt/N+Y3N5poMe8/WgoOdPy5C1Sf8CX8k7W0oIfiwd/CAZ7WFqxjGPWd+uwPMBwZzljiPlfj1lFgccswAZl7sZ8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1077.namprd21.prod.outlook.com (52.132.130.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.3; Thu, 1 Mar 2018 15:38:31 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:38:31 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , "David S . Miller" , Sasha Levin Subject: [added to the 4.1 stable tree] ipv4: ipconfig: avoid unused ic_proto_used symbol Thread-Topic: [added to the 4.1 stable tree] ipv4: ipconfig: avoid unused ic_proto_used symbol Thread-Index: AQHTsXHQugi/v80rn06zu5mdniOyLw== Date: Thu, 1 Mar 2018 15:27:30 +0000 Message-ID: <20180301152116.1486-469-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1077; 6:+TzDWnJopzpBiNanDpU6V67oFt0mG//5esJV6H6UjR4y1i4YkQ9hzbKZD3wedXJmG6RSMD3mk1hvMNuKHoG2qLIdCfnXRY0UtNEYyeT2fw3j/rQYlB1cKc5rW3nmuL8kgcbpbGawd/D2hv3+Uw33PjyxTUhjNtLPKLuz24XjoLKSLfL36DQYVMrW2TAcS29RY7ny1VL/KS5yviLXfsybZa08MlCcDVVF3tcM7XKIV9/IkSUMofLnAxXjm2KBfa4s/TSsoK54TTNMLofsN4AU0V0QIikoijndFuQcB5MZbn2f8HOUIIOHhY0913qSjfO63MPCED+B177V2ZxbWH+mKem1MsrwWRghu5g1MQcSwXqFErIJJ54vr45WjdHlyO2X; 5:uvShhAmbSryjUCUEFOvOO19vWjFsdSR2/F9mHG7yYk+/X/bX94LXmnTJ21BzXZKPUrdO1hXdNhfvykGcUjbpa1Vy39a4CPoE0ReFKZMwRPPxv2dY1SeTd+RW5AmEJRinfqCjamfeuyMuJaueTG7AeJn8oGRk1rkJO/B+ISbqPrc=; 24:zCKJn1TCtYNUrdE3+g7QaSsr4izk0POMeaRc+VeunnJ73y/auVyeJJKRnOZQcK6GVLjz7Xc/Rmr0Az7xlb0xxYOBm9r+j1nYfufL4ZF6JRU=; 7:zocm5A8ROVFWqMMOZmMBFyzQM6zlR1RGeZ2yUqLfxR/qwjB/u+ikns4Z4nys0iI7heYgVcjQNQuNcNpTZfsIM4zx3O5hz/W8aX5yPu6wEUWSgCK7v43eVNWPZmDmAaADLjJ2vv3fmPepee08XX8lSrLefVat+v6fg8XQmISX2849xB10Gk0tvcLWj9wPUCPcOUGUYUNnlObPB6j9HrvNO4OKwZ7SFuLxtYEhFrC4wC6d2afFgSKYGC7uUqQe8uFz x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ba67757f-742e-44f8-afe8-08d57f8a7c84 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:DM5PR2101MB1077; x-ms-traffictypediagnostic: DM5PR2101MB1077: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(158342451672863)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501224)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR2101MB1077; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1077; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(39380400002)(39860400002)(396003)(366004)(189003)(199004)(81166006)(2900100001)(10090500001)(2906002)(81156014)(66066001)(8676002)(1076002)(6116002)(3846002)(105586002)(8936002)(107886003)(186003)(106356001)(478600001)(22452003)(14454004)(4326008)(68736007)(25786009)(10290500003)(102836004)(6506007)(6346003)(59450400001)(26005)(36756003)(72206003)(6512007)(53936002)(6486002)(3280700002)(6436002)(3660700001)(316002)(76176011)(110136005)(5250100002)(86362001)(54906003)(7736002)(5660300001)(2950100002)(99286004)(86612001)(2501003)(305945005)(97736004)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1077; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: MsnxubS8ymQXbZrx/ephc+x3sP8y3Eyk+2a0FzNWGxUnc7ZR7zFGKyGcrKfddI+Ufk/1nfphBAjk9qV0E3pMSIDlleCNbuTvcPR8qPQP9i19z9UfS8MCc6ZKnM/PS26v4S0VyV0qpyhs4F1J7ZinMChx6FMXI0Adjm1xx3paEjQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba67757f-742e-44f8-afe8-08d57f8a7c84 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:27:30.8716 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1077 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit 52b79e2bdf92b07b37c805c50811eaf69a33683d ] 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: Sasha Levin --- net/ipv4/ipconfig.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 8e7328c6a390..6389616ccc3f 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -148,7 +148,11 @@ static char vendor_class_identifier[253] __initdata; /* 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 */