Skip to contentSkip to conversation

i386: no need to make enable_cpu_hotplug a variable

PATCH New Adrian Bunk 1 participant 1 message Jul 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386: no need to make enable_cpu_hotplug a variable

As long as there's no write access to this variable there's no reason to let gcc check it at runtime.

---

 arch/i386/kernel/topology.c |    2 --
 include/asm-i386/cpu.h      |    2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
include/asm-i386/cpu.h renamed from include/asm-i386/cpu.h.old +1 -1
@@ -13,7 +13,7 @@
 extern int arch_register_cpu(int num);
 #ifdef CONFIG_HOTPLUG_CPU
 extern void arch_unregister_cpu(int);
-extern int enable_cpu_hotplug;
+#define enable_cpu_hotplug	1
 #else
 #define enable_cpu_hotplug	0
 #endif
arch/i386/kernel/topology.c renamed from arch/i386/kernel/topology.c.old +0 -2
@@ -51,8 +51,6 @@
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-int enable_cpu_hotplug = 1;
-
 void arch_unregister_cpu(int num) {
 	return unregister_cpu(&cpu_devices[num].cpu);
 }