Skip to contentSkip to conversation

x86: make enable_TSC() static

PATCH In review Adrian Bunk 2 participants 2 messages Apr 23, 2008 – Apr 25, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: make enable_TSC() static

This patch makes the needlessly global enable_TSC() static.

---

 arch/x86/kernel/process_32.c |    2 +-
 arch/x86/kernel/process_64.c |    2 +-
 include/asm-x86/tsc.h        |    1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

4628dd5f4a92b7b7f86eab04e5bdaf4c411ca8e2 diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 7adad08..77de848 100644

arch/x86/kernel/process_32.c +1 -1
@@ -550,7 +550,7 @@ static void hard_enable_TSC(void)
 	write_cr4(read_cr4() & ~X86_CR4_TSD);
 }
 
-void enable_TSC(void)
+static void enable_TSC(void)
 {
 	preempt_disable();
 	if (test_and_clear_thread_flag(TIF_NOTSC))
arch/x86/kernel/process_64.c +1 -1
index 891af1a..131c2ee 100644
@@ -562,7 +562,7 @@ static void hard_enable_TSC(void)
 	write_cr4(read_cr4() & ~X86_CR4_TSD);
 }
 
-void enable_TSC(void)
+static void enable_TSC(void)
 {
 	preempt_disable();
 	if (test_and_clear_thread_flag(TIF_NOTSC))
include/asm-x86/tsc.h +0 -1
index 0434bd8..d2d8eb5 100644
@@ -18,7 +18,6 @@ extern unsigned int cpu_khz;
 extern unsigned int tsc_khz;
 
 extern void disable_TSC(void);
-extern void enable_TSC(void);
 
 static inline cycles_t get_cycles(void)
 {
#1 lore raw
Quoted 2 lines · Adrian Bunk

This patch makes the needlessly global enable_TSC() static.

Ah indeed, I added it for symmetry. But I guess there are more important considerations.

Erik