Skip to contentSkip to conversation

arm: Fix build warning

PATCH In review Guenter Roeck 2 participants 2 messages Jun 13, 2014 – Jun 17, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: Fix build warning

If compiled with W=1, the following warning is seen in arm builds.

arch/arm/kernel/topology.c:278:25: warning:
type qualifiers ignored on function return type

This is caused by a function returning 'const int', which doesn't make sense to gcc. Drop 'const' to fix the problem.

---
 arch/arm/kernel/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/topology.c +1 -1
index 3997c41..cc52061 100644
@@ -275,7 +275,7 @@ void store_cpu_topology(unsigned int cpuid)
 		cpu_topology[cpuid].socket_id, mpidr);
 }
 
-static inline const int cpu_corepower_flags(void)
+static inline int cpu_corepower_flags(void)
 {
 	return SD_SHARE_PKG_RESOURCES  | SD_SHARE_POWERDOMAIN;
 }
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Guenter Roeck

If compiled with W=1, the following warning is seen in arm builds.

arch/arm/kernel/topology.c:278:25: warning:
type qualifiers ignored on function return type

This is caused by a function returning 'const int', which doesn't make sense to gcc. Drop 'const' to fix the problem.