diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-12-03 20:17:01 -0500 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2014-12-04 04:57:41 -0500 |
commit | 06f9eb884be81431d54d7d37390043e3b5b7f14a (patch) | |
tree | e28156fbd499ff84798e5e3d4554932086459a6e | |
parent | 51c9fbb1b146f3336a93d398c439b6fbfe5ab489 (diff) |
arm64: Provide a namespace to NCAPS
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 <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm64/include/asm/cpufeature.h | 10 | ||||
-rw-r--r-- | arch/arm64/kernel/setup.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 0362f8020d46..07547ccc1f2b 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h | |||
@@ -24,11 +24,11 @@ | |||
24 | #define ARM64_WORKAROUND_CLEAN_CACHE 0 | 24 | #define ARM64_WORKAROUND_CLEAN_CACHE 0 |
25 | #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE 1 | 25 | #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE 1 |
26 | 26 | ||
27 | #define NCAPS 2 | 27 | #define ARM64_NCAPS 2 |
28 | 28 | ||
29 | #ifndef __ASSEMBLY__ | 29 | #ifndef __ASSEMBLY__ |
30 | 30 | ||
31 | extern DECLARE_BITMAP(cpu_hwcaps, NCAPS); | 31 | extern DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS); |
32 | 32 | ||
33 | static inline bool cpu_have_feature(unsigned int num) | 33 | static inline bool cpu_have_feature(unsigned int num) |
34 | { | 34 | { |
@@ -37,16 +37,16 @@ static inline bool cpu_have_feature(unsigned int num) | |||
37 | 37 | ||
38 | static inline bool cpus_have_cap(unsigned int num) | 38 | static inline bool cpus_have_cap(unsigned int num) |
39 | { | 39 | { |
40 | if (num >= NCAPS) | 40 | if (num >= ARM64_NCAPS) |
41 | return false; | 41 | return false; |
42 | return test_bit(num, cpu_hwcaps); | 42 | return test_bit(num, cpu_hwcaps); |
43 | } | 43 | } |
44 | 44 | ||
45 | static inline void cpus_set_cap(unsigned int num) | 45 | static inline void cpus_set_cap(unsigned int num) |
46 | { | 46 | { |
47 | if (num >= NCAPS) | 47 | if (num >= ARM64_NCAPS) |
48 | pr_warn("Attempt to set an illegal CPU capability (%d >= %d)\n", | 48 | pr_warn("Attempt to set an illegal CPU capability (%d >= %d)\n", |
49 | num, NCAPS); | 49 | num, ARM64_NCAPS); |
50 | else | 50 | else |
51 | __set_bit(num, cpu_hwcaps); | 51 | __set_bit(num, cpu_hwcaps); |
52 | } | 52 | } |
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 1de0e8a895ee..b80991166754 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; | |||
80 | unsigned int compat_elf_hwcap2 __read_mostly; | 80 | unsigned int compat_elf_hwcap2 __read_mostly; |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | DECLARE_BITMAP(cpu_hwcaps, NCAPS); | 83 | DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS); |
84 | 84 | ||
85 | static const char *cpu_name; | 85 | static const char *cpu_name; |
86 | phys_addr_t __fdt_pointer __initdata; | 86 | phys_addr_t __fdt_pointer __initdata; |