Skip to contentSkip to conversation

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

PATCH In review Andreas Herrmann 1 participant 2 messages Sep 15, 2009 – Sep 19, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, mce: Fix compile warning in case of CONFIG_SMP=n

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.

---
 arch/x86/kernel/cpu/mcheck/mce_amd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/kernel/cpu/mcheck/mce_amd.c +2 -1
index 1fecba4..9e96043 100644
@@ -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);
 
Signature · 1 line
1.6.2.5
#1 lore raw
Commit-ID:  a017421ddcdf34474f1133b27e33ab2ca6c19b96
Gitweb:     http://git.kernel.org/tip/a017421ddcdf34474f1133b27e33ab2ca6c19b96
Author:     Andreas Herrmann <[email protected]>
AuthorDate: Tue, 15 Sep 2009 17:17:27 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sat, 19 Sep 2009 19:48:14 +0200

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

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.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/cpu/mcheck/mce_amd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/kernel/cpu/mcheck/mce_amd.c +2 -1
index 8cd5224..83a3d1f 100644
@@ -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);