From patchwork Mon Dec 18 13:41:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 122214 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2849076qgn; Mon, 18 Dec 2017 05:42:11 -0800 (PST) X-Google-Smtp-Source: ACJfBouaQeqBV4FkwT3JHod72e2LbtYnxm4AYlIFtHrhTT+ijtjkbBpzD0zf3RRTJUs58WmB+pCR X-Received: by 10.84.136.135 with SMTP id 7mr22602096pll.21.1513604531675; Mon, 18 Dec 2017 05:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513604531; cv=none; d=google.com; s=arc-20160816; b=IRIgZWmlo0UCfJYfRK1qJF0XWYF/zIScLurVhObnx0ffmNbenf/N8wkhF9Gfdjge6w zvyQaSYNn1tl+zaQWijEQ9OyJ8kuOE8mtDzxGQcjQne0SOPTKxTl8GWkyFWXcP2m8e2Y J+/vFj+tG0wu/26D1Uxe29rG1bB7tGbfe6XNtnnwhgy7/uyO5zR+23xVhweIV2s9RUdz doIZYFVU4nrOF+vRx//1bXGcmQ2XHcE5Q9p0V2cDtN7qYji2J9D5H9l0ggovTt4oLKDH 9pv9qWKgTUkeVmTF1PBuapvhfPfiMAvp7wsijlTyFDK635QQIhEJpRVBNOU7rGdRMhsI 6P3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=eeX7cK5wi3f07WdY9FIqxYhfvSZp4z/EBZmDtODA68E=; b=FRfx5flauidYasS/jzPVi1IWztoz/afU2b9feRYi+zRKCiRSl9Mo3ALKX39l+G9yxE 7wCxafLmtekG9gr60DcsoYQlwJVjXydOFzB6eYRhovq+sgwiIi449Wwh5opCFZVChi0J WBCp41N8JdLXRy37NA/aYEOv3PwsQ+i5ePD8kjsjwhIgDHp/VSCbrS5BKGxZJ0r72NRB sFSCk06Y9RB5ZmLN3w2eSiuhhr70dFSISihnFy6ZCF1piZUihtX5alZyur3WRw5IztGd 0Z4bNfCtc9ozh6DqCNuU8ZXPRegmRozIgKa9P6lqE1HyW+P8fWf5N0myNu/K0BfVq1c7 6Shg== 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 m7si9477390pfi.179.2017.12.18.05.42.11; Mon, 18 Dec 2017 05:42:11 -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 S1758316AbdLRNmH (ORCPT + 28 others); Mon, 18 Dec 2017 08:42:07 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:63000 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750802AbdLRNmD (ORCPT ); Mon, 18 Dec 2017 08:42:03 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0LsdeH-1fAgdq487t-012JNb; Mon, 18 Dec 2017 14:41:28 +0100 From: Arnd Bergmann To: Brian Norris , Gregory Fong , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Russell King Cc: Arnd Bergmann , Alamy Liu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: B15: fix unused label warnings Date: Mon, 18 Dec 2017 14:41:11 +0100 Message-Id: <20171218134126.2913861-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:f4WzuawdkC+W8uu3zGqtnfl+NAaqgiggg37SfrYCdHDlP1ulRgw BRLM9mJcgv/S4/sbjX7QJUBh/ESTQIYSoyYoMjlqSEEeTRSHyTIWDpVOp50luPWk3Jp0YMT KTNdIXbGXNrWZzFvTvNq/iZHyTrg/6cfU5QYGPHcNBusxZfu6Q5rW34KiGRjiWwrUE8SFcZ SLyouEEtVn7GgrKF8HSUQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:XsXBldl6Nyo=:j833WZfuShBnVbkjWfK1WI BorbZngtpqYCkF5zgRNu6JzSi/5pVRayJy122znRnTfRzevRjZIeLO2fMOyoqH30ObVvp/gpS nAJRFNiCj1pQVYTbLNyysBN7Y1VGVb2tjuatEvXXTLIBtZA+20+lhrsCFhIgTeDkGbyB0Wlfd IeSK+vUzbOzVUoXVn0mG5sqUpZ01A6zBbLVA123COHxvUJzoijzxT/4cx2a5mtccCta6IP014 ISmv5F9H2kDyPmCgTk3ff4aAjZGbzVo/rcthQup0oSCQ3nsm1Hey98kaVw7iEk6/LwKoR9tQ6 2SzyTJcTmNdUVn2XJFPnReuiB9nYKXTgXahMbbM0Bz84Ql785Q9ORwX69VfNQAcwKOTlFM1VN tWDCX8ewrlV8RZlSQJuiKwIT72NjzmWRKJWuY1TRkbKOScsEGuQAuUmSWOTvcIPohrY/5MOSB kwHMvRv5E6J2zm359vNpWa83InxzlBWwaMR6QELW4XqLoIsFyMqdBCZPNGHp4QFxZdHH0Kkj1 8EcDkt+BDXAHXjfjTF+S01AizGneiKvVucZyU4H2vJ9aTZO4IMrnVHZ8xso8BFNDNZY+qLj5M BSCeW0i9z3N09GfUVUsNI+j8WMQewEeSCDPr7EAXgN5bkLGHEeiEDhNxgI9QfHk1L+PfIwXjG XGnSlTquR2IlTu0Zfr16WTLhRa9RYh1A0IegdO/1ygAd60PSNQPkeLBBWCEySKWtsIOwLBhi9 dpc6gthjcZZmtwbS/uNxJq21kMsk+mTUDP1B4Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The new conditionally compiled code leaves some labels and one variable unreferenced when CONFIG_HOTPLUG_CPU and CONFIG_PM_SLEEP are disabled: arch/arm/mm/cache-b15-rac.c: In function 'b15_rac_init': arch/arm/mm/cache-b15-rac.c:353:1: error: label 'out_unmap' defined but not used [-Werror=unused-label] out_unmap: ^~~~~~~~~ arch/arm/mm/cache-b15-rac.c:351:1: error: label 'out_cpu_dead' defined but not used [-Werror=unused-label] out_cpu_dead: ^~~~~~~~~~~~ At top level: arch/arm/mm/cache-b15-rac.c:53:12: error: 'rac_config0_reg' defined but not used [-Werror=unused-variable] This adds more #ifdefs around them. Fixes: 55de88778f4b ("ARM: 8726/1: B15: Add CPU hotplug awareness") Signed-off-by: Arnd Bergmann --- Florian, if this looks good to you, please forward the fix into Russell's patch tracker, otherwise just send a better fix. --- arch/arm/mm/cache-b15-rac.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.9.0 diff --git a/arch/arm/mm/cache-b15-rac.c b/arch/arm/mm/cache-b15-rac.c index f76988790011..24cb3b7a0501 100644 --- a/arch/arm/mm/cache-b15-rac.c +++ b/arch/arm/mm/cache-b15-rac.c @@ -50,7 +50,10 @@ extern void v7_flush_kern_cache_all(void); static void __iomem *b15_rac_base; static DEFINE_SPINLOCK(rac_lock); + +#if IS_ENABLED(CONFIG_HOTPLUG_CPU) || IS_ENABLED(CONFIG_PM_SLEEP) static u32 rac_config0_reg; +#endif /* Initialization flag to avoid checking for b15_rac_base, and to prevent * multi-platform kernels from crashing here as well. @@ -348,11 +351,13 @@ static int __init b15_rac_init(void) goto out; +#ifdef CONFIG_HOTPLUG_CPU out_cpu_dead: cpuhp_remove_state_nocalls(CPUHP_AP_ARM_CACHE_B15_RAC_DYING); out_unmap: unregister_reboot_notifier(&b15_rac_reboot_nb); iounmap(b15_rac_base); +#endif out: of_node_put(dn); return ret;