linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: vfp: Fix build warning when CONFIG_CONFIG_VFPv3=n
@ 2014-11-19 14:51 Fabio Estevam
  0 siblings, 0 replies; only message in thread
From: Fabio Estevam @ 2014-11-19 14:51 UTC (permalink / raw)
  To: linux-arm-kernel

Building bcm2835_defconfig, which has CONFIG_CONFIG_VFPv3=n causes the following
build 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;
      ^

As mvfr0 is only used inside a '#ifdef CONFIG_VFPv3' code block, protect its 
definition accordingly to avoid the warning.

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/vfp/vfpmodule.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 5002d00..19a9338 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -722,7 +722,9 @@ static int __init vfp_init(void)
 {
 	unsigned int vfpsid;
 	unsigned int cpu_arch = cpu_architecture();
+#ifdef CONFIG_VFPv3
 	u32 mvfr0;
+#endif
 
 	if (cpu_arch >= CPU_ARCH_ARMv6)
 		on_each_cpu(vfp_enable, NULL, 1);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-19 14:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19 14:51 [PATCH] ARM: vfp: Fix build warning when CONFIG_CONFIG_VFPv3=n Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).