Skip to contentSkip to conversation

powerpc: Define cpus_in_crash only for SMP kernels

PATCH In review Paul E. McKenney 2 participants 3 messages Feb 1, 2012 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Define cpus_in_crash only for SMP kernels

The variable cpus_in_crash gets a defined-but-not-used warning when CONFIG_SMP=n, so fix by placing the variable under ifdef.

arch/powerpc/kernel/crash.c +2 -0
index 28be345..eb3384e 100644
@@ -46,7 +46,9 @@
 
 /* This keeps a track of which one is the crashing cpu. */
 int crashing_cpu = -1;
+#ifdef CONFIG_SMP
 static atomic_t cpus_in_crash;
+#endif /* #ifdef CONFIG_SMP */
 static int time_to_dump;
 
 #define CRASH_HANDLER_MAX 3
#1 lore raw
Quoted 2 lines · Paul E. McKenney

The variable cpus_in_crash gets a defined-but-not-used warning when CONFIG_SMP=n, so fix by placing the variable under ifdef.

I think Ben already merged a similar fix.

http://patchwork.ozlabs.org/patch/136549/

P.

Quoted 18 lines
arch/powerpc/kernel/crash.c +2 -0
index 28be345..eb3384e 100644
@@ -46,7 +46,9 @@
 
 /* This keeps a track of which one is the crashing cpu. */
 int crashing_cpu = -1;
+#ifdef CONFIG_SMP
 static atomic_t cpus_in_crash;
+#endif /* #ifdef CONFIG_SMP */
 static int time_to_dump;
 
 #define CRASH_HANDLER_MAX 3
#2 lore raw
Quoted 9 lines · Paul Gortmaker
Quoted 2 lines · Paul E. McKenney

The variable cpus_in_crash gets a defined-but-not-used warning when CONFIG_SMP=n, so fix by placing the variable under ifdef.

I think Ben already merged a similar fix.

http://patchwork.ozlabs.org/patch/136549/

P.

Linus's tree does now have cpus_in_crash, so agreed. Sorry for the noise!

Thanx, Paul

Quoted 18 lines
Quoted 17 lines
arch/powerpc/kernel/crash.c +2 -0
index 28be345..eb3384e 100644
@@ -46,7 +46,9 @@
 
 /* This keeps a track of which one is the crashing cpu. */
 int crashing_cpu = -1;
+#ifdef CONFIG_SMP
 static atomic_t cpus_in_crash;
+#endif /* #ifdef CONFIG_SMP */
 static int time_to_dump;
 
 #define CRASH_HANDLER_MAX 3