Thread (9 messages) flat view 9 messages, 4 authors, 2014-06-25

Re: [PATCH] powerpc: Fix build warning

From: David Rientjes <rientjes@google.com>
Date: 2014-06-17 01:25:28
Also in: lkml

On Fri, 13 Jun 2014, Guenter Roeck wrote:
If compiled with W=1, the following warning is seen in powerpc builds.

arch/powerpc/kernel/smp.c:750:18: warning:
	type qualifiers ignored on function return type
static const int powerpc_smt_flags(void)
                 ^

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>

Although it's strange you report this happening on line 750 in the 
changelog but the patch shows it differently.
quoted hunk ↗ jump to hunk
---
 arch/powerpc/kernel/smp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 10ffffe..49d5d4e 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -768,7 +768,7 @@ int setup_profiling_timer(unsigned int multiplier)
 
 #ifdef CONFIG_SCHED_SMT
 /* cpumask of CPUs with asymetric SMT dependancy */
-static const int powerpc_smt_flags(void)
+static int powerpc_smt_flags(void)
 {
 	int flags = SD_SHARE_CPUPOWER | SD_SHARE_PKG_RESOURCES;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help