From patchwork Thu May 4 20:51:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 98577 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp806379qgd; Thu, 4 May 2017 13:52:28 -0700 (PDT) X-Received: by 10.84.224.66 with SMTP id a2mr24247827plt.191.1493931147958; Thu, 04 May 2017 13:52:27 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si3136031pls.89.2017.05.04.13.52.27; Thu, 04 May 2017 13:52:27 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751353AbdEDUw1 (ORCPT + 6 others); Thu, 4 May 2017 16:52:27 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:52704 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751281AbdEDUwZ (ORCPT ); Thu, 4 May 2017 16:52:25 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0M8u2m-1dE7Vl3Sea-00C8aL; Thu, 04 May 2017 22:52:17 +0200 From: Arnd Bergmann To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, Fabio Estevam , Will Deacon , Arnd Bergmann Subject: [PATCH 02/13] [3.18-stable] arm64: Provide a namespace to NCAPS Date: Thu, 4 May 2017 22:51:58 +0200 Message-Id: <20170504205209.498721-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170504205209.498721-1-arnd@arndb.de> References: <20170504205209.498721-1-arnd@arndb.de> X-Provags-ID: V03:K0:/rrOTj/TEtxiLXolz36/DhNLJtJSPTob3hzB2QpeRg7ld8blkza fyG81Qn4noHCTjx3BwC+3BvLX9uTAScMnsvBb+fl/J8T5c+75FCf0U6dT2IpMCoG8AWUM92 tS+e+FxIDjzi9ri7T+Lp8vKcjC2ax/5sgNL/PT/7aPZcHVhiUIfDedzBIGMxFiADLQZ2SDu fEkK5pkpCZUAcKW+z8Gog== X-UI-Out-Filterresults: notjunk:1; V01:K0:iMU9TI2IQd4=:GlvD2K1J6dzyEedq2UO6P/ MHcrjIA9JsmeiR7KonoM4SP0+3fgx3e59YRYfHa6kNJ/1P374rS038tBlCYBpCuXrL7wR9QWh oH7sHgSg2GxKLNjjo5UB/Gw1Y97/p5D6SW/eL+i6IzFesgpQi8dUSbUfeDuu9n2y9SRLRo7HO Li2SPBrhs6dUpbOJFFX1FeAhASBgPzVYaSSWOcZh4kSSrpSQDzJt2mI/KEX8znxSULffi9pso r3BIDwk12c+JO4T8ZLTNd9LLODvDLjKWuKAgX+xW/xKwFcrteUJGuBpRcw3s2Nm/Gi96OxqwB Xb2E6RGvcbpPLlu8dzxhHfb0ogaB4FPGPqW4t7OLVK6kUMMjHMC5/RdeijIBn5udYlwXezqUo eQRcWgsAiN8BBHaHpVKvXiHxvpL+zmk12yC29J4gSfqBJOPN5katL6xoV3aurcibMz6IwC41z P8oD+jisXD5vS0dFy5zcUbuzEBftRheRa+bOE7If4U2PHbbOBbd5WFFsbIk0hqbEQoCntdIu4 22BumOBBsc+Q+KdJ/jhmxbvtS8MXUNO1kbDFzSF+04rIdkAmUi2xJomaOMO4YgXqIFlu2K1GR IUK8dVR66HgNOuKheSSK3h9mjY3d4Ma9/wGdDO1W1yTGIkSXmpiMhOtCIYpiaQKFKjQsE5HFI DNvfdMRE4wCu+W6naG8yrtYoxJu/IQJng1BwV2iItL3vZ5dwR4r5SU+eD4WxyB33gAOQ= Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Fabio Estevam Commit 06f9eb884be81431d54d7d37390043e3b5b7f14a upstream. Building arm64.allmodconfig leads to the following warning: usb/gadget/function/f_ncm.c:203:0: warning: "NCAPS" redefined #define NCAPS (USB_CDC_NCM_NCAP_ETH_FILTER | USB_CDC_NCM_NCAP_CRC_MODE) ^ In file included from /home/build/work/batch/arch/arm64/include/asm/io.h:32:0, from /home/build/work/batch/include/linux/clocksource.h:19, from /home/build/work/batch/include/clocksource/arm_arch_timer.h:19, from /home/build/work/batch/arch/arm64/include/asm/arch_timer.h:27, from /home/build/work/batch/arch/arm64/include/asm/timex.h:19, from /home/build/work/batch/include/linux/timex.h:65, from /home/build/work/batch/include/linux/sched.h:19, from /home/build/work/batch/arch/arm64/include/asm/compat.h:25, from /home/build/work/batch/arch/arm64/include/asm/stat.h:23, from /home/build/work/batch/include/linux/stat.h:5, from /home/build/work/batch/include/linux/module.h:10, from /home/build/work/batch/drivers/usb/gadget/function/f_ncm.c:19: arch/arm64/include/asm/cpufeature.h:27:0: note: this is the location of the previous definition #define NCAPS 2 So add a ARM64 prefix to avoid such problem. Reported-by: Olof's autobuilder Signed-off-by: Fabio Estevam Signed-off-by: Will Deacon Signed-off-by: Arnd Bergmann --- Slightly adapted for context changes --- arch/arm64/include/asm/cpufeature.h | 10 +++++----- arch/arm64/kernel/setup.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) -- 2.9.0 diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index c008bae718eb..5fe4befda1a5 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -25,11 +25,11 @@ #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE 1 #define ARM64_WORKAROUND_845719 2 -#define NCAPS 3 +#define ARM64_NCAPS 3 #ifndef __ASSEMBLY__ -extern DECLARE_BITMAP(cpu_hwcaps, NCAPS); +extern DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS); static inline bool cpu_have_feature(unsigned int num) { @@ -38,16 +38,16 @@ static inline bool cpu_have_feature(unsigned int num) static inline bool cpus_have_cap(unsigned int num) { - if (num >= NCAPS) + if (num >= ARM64_NCAPS) return false; return test_bit(num, cpu_hwcaps); } static inline void cpus_set_cap(unsigned int num) { - if (num >= NCAPS) + if (num >= ARM64_NCAPS) pr_warn("Attempt to set an illegal CPU capability (%d >= %d)\n", - num, NCAPS); + num, ARM64_NCAPS); else __set_bit(num, cpu_hwcaps); } diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index b5853eec2a2d..54e3dd225b44 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -80,7 +80,7 @@ unsigned int compat_elf_hwcap __read_mostly = COMPAT_ELF_HWCAP_DEFAULT; unsigned int compat_elf_hwcap2 __read_mostly; #endif -DECLARE_BITMAP(cpu_hwcaps, NCAPS); +DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS); static const char *cpu_name; phys_addr_t __fdt_pointer __initdata;