Thread (4 messages) 4 messages, 2 authors, 2012-01-24

Re: error: 'cpus_in_crash' defined but not used

From: Christian Kujau <hidden>
Date: 2012-01-18 05:13:10
Also in: lkml
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Linus Torvalds

On Tue, 17 Jan 2012 at 20:13, Christian Kujau wrote:
compiling today's git (mainline, a25a2b8) on powerpc32 gives:

  CC      arch/powerpc/kernel/crash.o
cc1: warnings being treated as errors
/usr/local/src/linux-2.6-git/arch/powerpc/kernel/crash.c:49: error: 
‘cpus_in_crash’ defined but not used
make[2]: *** [arch/powerpc/kernel/crash.o] Error 1
make[1]: *** [arch/powerpc/kernel] Error 2
make: *** [sub-make] Error 2
I could not find cpus_in_crash anywhere in the sourcetree, except for 
arch/powerpc/kernel/crash.c. Moving the definition into the CONFIG_SMP 
ifdef helps on my UP system, of course - not sure about other machines 
though:
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 28be345..abef751 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -46,7 +46,6 @@
 
 /* This keeps a track of which one is the crashing cpu. */
 int crashing_cpu = -1;
-static atomic_t cpus_in_crash;
 static int time_to_dump;
 
 #define CRASH_HANDLER_MAX 3
@@ -66,6 +65,7 @@ static int handle_fault(struct pt_regs *regs)
 
 #ifdef CONFIG_SMP
 
+static atomic_t cpus_in_crash;
 void crash_ipi_callback(struct pt_regs *regs)
 {
 	static cpumask_t cpus_state_saved = CPU_MASK_NONE;

Christian.
-- 
BOFH excuse #272:

Netscape has crashed
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help