[PATCH] x86, mce: Fix compile warning in case of CONFIG_SMP=n

From: Andreas Herrmann
Date: Tue Sep 15 2009 - 11:19:19 EST



Fix following compile warning:

arch/x86/kernel/cpu/mcheck/mce_amd.c: In function âthreshold_create_bankâ:
arch/x86/kernel/cpu/mcheck/mce_amd.c:492: warning: unused variable âcâ

which shows up when kernel is compiled with CONFIG_SMP=n.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
---
arch/x86/kernel/cpu/mcheck/mce_amd.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c
index 1fecba4..9e96043 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
@@ -489,8 +489,9 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
int i, err = 0;
struct threshold_bank *b = NULL;
char name[32];
+#ifdef CONFIG_SMP
struct cpuinfo_x86 *c = &cpu_data(cpu);
-
+#endif

sprintf(name, "threshold_bank%i", bank);

--
1.6.2.5



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/