Commit 2b94fe2a authored by Stephen Boyd's avatar Stephen Boyd Committed by Russell King

ARM: 8215/1: vfp: Silence mvfr0 variable unused warning

Stephen Rothwell reports that commit 3f4c9f8f0a20 ("ARM: 8197/1:
vfp: Fix VFPv3 hwcap detection on CPUID based cpus") introduced a
variable unused warning.

arch/arm/vfp/vfpmodule.c: In function 'vfp_init':
arch/arm/vfp/vfpmodule.c:725:6: warning: unused variable 'mvfr0'
[-Wunused-variable]
  u32 mvfr0;

Silence this warning by using IS_ENABLED instead of ifdefs.
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 6c96a4a6
...@@ -722,7 +722,6 @@ static int __init vfp_init(void) ...@@ -722,7 +722,6 @@ static int __init vfp_init(void)
{ {
unsigned int vfpsid; unsigned int vfpsid;
unsigned int cpu_arch = cpu_architecture(); unsigned int cpu_arch = cpu_architecture();
u32 mvfr0;
if (cpu_arch >= CPU_ARCH_ARMv6) if (cpu_arch >= CPU_ARCH_ARMv6)
on_each_cpu(vfp_enable, NULL, 1); on_each_cpu(vfp_enable, NULL, 1);
...@@ -752,12 +751,12 @@ static int __init vfp_init(void) ...@@ -752,12 +751,12 @@ static int __init vfp_init(void)
* precision floating point operations. Only check * precision floating point operations. Only check
* for NEON if the hardware has the MVFR registers. * for NEON if the hardware has the MVFR registers.
*/ */
#ifdef CONFIG_NEON if (IS_ENABLED(CONFIG_NEON) &&
if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) (fmrx(MVFR1) & 0x000fff00) == 0x00011100)
elf_hwcap |= HWCAP_NEON; elf_hwcap |= HWCAP_NEON;
#endif
#ifdef CONFIG_VFPv3 if (IS_ENABLED(CONFIG_VFPv3)) {
mvfr0 = fmrx(MVFR0); u32 mvfr0 = fmrx(MVFR0);
if (((mvfr0 & MVFR0_DP_MASK) >> MVFR0_DP_BIT) == 0x2 || if (((mvfr0 & MVFR0_DP_MASK) >> MVFR0_DP_BIT) == 0x2 ||
((mvfr0 & MVFR0_SP_MASK) >> MVFR0_SP_BIT) == 0x2) { ((mvfr0 & MVFR0_SP_MASK) >> MVFR0_SP_BIT) == 0x2) {
elf_hwcap |= HWCAP_VFPv3; elf_hwcap |= HWCAP_VFPv3;
...@@ -775,7 +774,7 @@ static int __init vfp_init(void) ...@@ -775,7 +774,7 @@ static int __init vfp_init(void)
if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000) if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000)
elf_hwcap |= HWCAP_VFPv4; elf_hwcap |= HWCAP_VFPv4;
#endif }
/* Extract the architecture version on pre-cpuid scheme */ /* Extract the architecture version on pre-cpuid scheme */
} else { } else {
if (vfpsid & FPSID_NODOUBLE) { if (vfpsid & FPSID_NODOUBLE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment