From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] hpet: make some code static (fwd)
Date: Sun, 16 Jan 2005 03:01:46 +0100 [thread overview]
Message-ID: <20050116020146.GK4274@stusta.de> (raw)
The patch forwarded below still applies and compiles against
2.6.11-rc1-mm1.
Please apply.
----- Forwarded message from Adrian Bunk <bunk@stusta.de> -----
Date: Sun, 12 Dec 2004 03:11:03 +0100
From: Adrian Bunk <bunk@stusta.de>
To: linux-kernel@vger.kernel.org
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(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc2-mm4-full/include/asm-i386/hpet.h.old 2004-12-11 23:47:52.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/include/asm-i386/hpet.h 2004-12-11 23:49:41.000000000 +0100
@@ -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);
--- linux-2.6.10-rc2-mm4-full/arch/i386/kernel/time_hpet.c.old 2004-12-11 23:48:14.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/arch/i386/kernel/time_hpet.c 2004-12-11 23:50:22.000000000 +0100
@@ -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;
--- linux-2.6.10-rc2-mm4-full/arch/x86_64/kernel/time.c.old 2004-12-11 23:49:04.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/arch/x86_64/kernel/time.c 2004-12-11 23:49:14.000000000 +0100
@@ -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 */
--- linux-2.6.10-rc2-mm4-full/arch/i386/kernel/timers/timer_hpet.c.old 2004-12-11 23:50:57.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/arch/i386/kernel/timers/timer_hpet.c 2004-12-11 23:51:07.000000000 +0100
@@ -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;
--- linux-2.6.10-rc2-mm4-full/arch/i386/kernel/time.c.old 2004-12-11 23:46:37.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/arch/i386/kernel/time.c 2004-12-11 23:47:02.000000000 +0100
@@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----
reply other threads:[~2005-01-16 2:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050116020146.GK4274@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.