Skip to contentSkip to conversation

hpet: make some code static (fwd)

PATCH New Adrian Bunk 1 participant 1 message Jan 16, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hpet: make some code static (fwd)

The patch forwarded below still applies and compiles against 2.6.11-rc1-mm1.

Please apply.

----- Forwarded message from Adrian Bunk <[email protected]> -----

Date: Sun, 12 Dec 2004 03:11:03 +0100
From: Adrian Bunk <[email protected]>
To: [email protected]
Subject: [2.6 patch] hpet: make some code static

The patch below makes some needlessly global code static.

diffstat output:

 arch/i386/kernel/time.c              |    2 +-
 arch/i386/kernel/time_hpet.c         |   10 +++++-----
 arch/i386/kernel/timers/timer_hpet.c |    2 +-
 arch/x86_64/kernel/time.c            |    2 +-
 include/asm-i386/hpet.h              |    2 --
 5 files changed, 8 insertions(+), 10 deletions(-)
include/asm-i386/hpet.h renamed from include/asm-i386/hpet.h.old +0 -2
@@ -90,7 +90,6 @@
  */
 #define HPET_MIN_PERIOD (100000UL)
 
-extern unsigned long hpet_period;	/* fsecs / HPET clock */
 extern unsigned long hpet_tick;  	/* hpet clks count per tick */
 extern unsigned long hpet_address;	/* hpet memory map physical address */
 
@@ -100,7 +99,6 @@
 extern int is_hpet_enabled(void);
 extern int is_hpet_capable(void);
 extern int hpet_readl(unsigned long a);
-extern void hpet_writel(unsigned long d, unsigned long a);
 
 #ifdef CONFIG_HPET_EMULATE_RTC
 extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask);
arch/i386/kernel/time_hpet.c renamed from arch/i386/kernel/time_hpet.c.old +5 -5
@@ -23,9 +23,9 @@
 #include <asm/hpet.h>
 #include <linux/hpet.h>
 
-unsigned long hpet_period;	/* fsecs / HPET clock */
-unsigned long hpet_tick;	/* hpet clks count per tick */
-unsigned long hpet_address;	/* hpet memory map physical address */
+static unsigned long hpet_period;	/* fsecs / HPET clock */
+unsigned long hpet_tick;		/* hpet clks count per tick */
+unsigned long hpet_address;		/* hpet memory map physical address */
 
 static int use_hpet; 		/* can be used for runtime check of hpet */
 static int boot_hpet_disable; 	/* boottime override for HPET timer */
@@ -38,7 +38,7 @@
 	return readl(hpet_virt_address + a);
 }
 
-void hpet_writel(unsigned long d, unsigned long a)
+static void hpet_writel(unsigned long d, unsigned long a)
 {
 	writel(d, hpet_virt_address + a);
 }
@@ -49,7 +49,7 @@
  * comparator value and continue. Next tick can be caught by checking
  * for a change in the comparator value. Used in apic.c.
  */
-void __init wait_hpet_tick(void)
+static void __init wait_hpet_tick(void)
 {
 	unsigned int start_cmp_val, end_cmp_val;
 
arch/x86_64/kernel/time.c renamed from arch/x86_64/kernel/time.c.old +1 -1
@@ -58,7 +58,7 @@
 #undef HPET_HACK_ENABLE_DANGEROUS
 
 unsigned int cpu_khz;					/* TSC clocks / usec, not used here */
-unsigned long hpet_period;				/* fsecs / HPET clock */
+static unsigned long hpet_period;			/* fsecs / HPET clock */
 unsigned long hpet_tick;				/* HPET clocks / interrupt */
 unsigned long vxtime_hz = PIT_TICK_RATE;
 int report_lost_ticks;				/* command line option */
arch/i386/kernel/timers/timer_hpet.c renamed from arch/i386/kernel/timers/timer_hpet.c.old +1 -1
@@ -118,7 +118,7 @@
 	write_sequnlock(&monotonic_lock);
 }
 
-void delay_hpet(unsigned long loops)
+static void delay_hpet(unsigned long loops)
 {
 	unsigned long hpet_start, hpet_end;
 	unsigned long eax;
arch/i386/kernel/time.c renamed from arch/i386/kernel/time.c.old +1 -1
@@ -379,7 +379,7 @@
 #ifdef CONFIG_HPET_TIMER
 extern void (*late_time_init)(void);
 /* Duplicate of time_init() below, with hpet_enable part added */
-void __init hpet_time_init(void)
+static void __init hpet_time_init(void)
 {
 	xtime.tv_sec = get_cmos_time();
 	wall_to_monotonic.tv_sec = -xtime.tv_sec;

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

----- End forwarded message -----