[PATCH] powerpc: Define cpus_in_crash only for SMP kernels

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE5301d

3 messages, 2 authors, 2012-02-01 · open the first message on its own page

[PATCH] powerpc: Define cpus_in_crash only for SMP kernels

From: Paul E. McKenney <hidden>
Date: 2012-02-01 18:56:23

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

Signed-off-by: Paul E. McKenney <redacted>
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 28be345..eb3384e 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -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

Re: [PATCH] powerpc: Define cpus_in_crash only for SMP kernels

From: Paul Gortmaker <hidden>
Date: 2012-02-01 20:29:13

On 12-02-01 01:55 PM, Paul E. McKenney wrote:
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 hunk
Signed-off-by: Paul E. McKenney <redacted>
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 28be345..eb3384e 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -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

Re: [PATCH] powerpc: Define cpus_in_crash only for SMP kernels

From: Paul E. McKenney <hidden>
Date: 2012-02-01 23:15:57

On Wed, Feb 01, 2012 at 03:28:34PM -0500, Paul Gortmaker wrote:
On 12-02-01 01:55 PM, Paul E. McKenney wrote:
quoted
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
Signed-off-by: Paul E. McKenney <redacted>
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 28be345..eb3384e 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help