linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: Fix build warning
@ 2014-06-13 16:40 Guenter Roeck
  2014-06-17  1:25 ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2014-06-13 16:40 UTC (permalink / raw)
  To: Russell King
  Cc: Vincent Guittot, linux-arm-kernel, linux-kernel, 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.

Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/arm/kernel/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 3997c41..cc52061 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -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;
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm: Fix build warning
  2014-06-13 16:40 [PATCH] arm: Fix build warning Guenter Roeck
@ 2014-06-17  1:25 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2014-06-17  1:25 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Russell King, Vincent Guittot, linux-arm-kernel, linux-kernel

On Fri, 13 Jun 2014, Guenter Roeck wrote:

> 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.
> 
> Reported-by: Vincent Guittot <vincent.guittot@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-17  1:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-13 16:40 [PATCH] arm: Fix build warning Guenter Roeck
2014-06-17  1:25 ` David Rientjes

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).