From: Adrian Bunk The patch below makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/kernel/time.c | 2 +- 25-akpm/arch/i386/kernel/time_hpet.c | 10 +++++----- 25-akpm/arch/i386/kernel/timers/timer_hpet.c | 2 +- 25-akpm/arch/x86_64/kernel/time.c | 2 +- 25-akpm/include/asm-i386/hpet.h | 2 -- 5 files changed, 8 insertions(+), 10 deletions(-) diff -puN arch/i386/kernel/time.c~hpet-make-some-code-static arch/i386/kernel/time.c --- 25/arch/i386/kernel/time.c~hpet-make-some-code-static 2005-01-23 14:47:37.943428888 -0800 +++ 25-akpm/arch/i386/kernel/time.c 2005-01-23 14:47:37.952427520 -0800 @@ -385,7 +385,7 @@ device_initcall(time_init_device); #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(); xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ); diff -puN arch/i386/kernel/time_hpet.c~hpet-make-some-code-static arch/i386/kernel/time_hpet.c --- 25/arch/i386/kernel/time_hpet.c~hpet-make-some-code-static 2005-01-23 14:47:37.945428584 -0800 +++ 25-akpm/arch/i386/kernel/time_hpet.c 2005-01-23 14:47:37.953427368 -0800 @@ -23,9 +23,9 @@ #include #include -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 @@ int hpet_readl(unsigned long a) 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 @@ void hpet_writel(unsigned long d, unsign * 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; diff -puN arch/i386/kernel/timers/timer_hpet.c~hpet-make-some-code-static arch/i386/kernel/timers/timer_hpet.c --- 25/arch/i386/kernel/timers/timer_hpet.c~hpet-make-some-code-static 2005-01-23 14:47:37.946428432 -0800 +++ 25-akpm/arch/i386/kernel/timers/timer_hpet.c 2005-01-23 14:47:37.953427368 -0800 @@ -118,7 +118,7 @@ static void mark_offset_hpet(void) 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; diff -puN arch/x86_64/kernel/time.c~hpet-make-some-code-static arch/x86_64/kernel/time.c --- 25/arch/x86_64/kernel/time.c~hpet-make-some-code-static 2005-01-23 14:47:37.947428280 -0800 +++ 25-akpm/arch/x86_64/kernel/time.c 2005-01-23 14:47:37.954427216 -0800 @@ -58,7 +58,7 @@ static int notsc __initdata = 0; #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 */ diff -puN include/asm-i386/hpet.h~hpet-make-some-code-static include/asm-i386/hpet.h --- 25/include/asm-i386/hpet.h~hpet-make-some-code-static 2005-01-23 14:47:37.949427976 -0800 +++ 25-akpm/include/asm-i386/hpet.h 2005-01-23 14:47:37.955427064 -0800 @@ -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 hpet_reenable(void); 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); _