* [2.6 patch] mtrr: some cleanups (fwd)
@ 2005-01-15 21:40 Adrian Bunk
0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2005-01-15 21:40 UTC (permalink / raw)
To: Andrew Morton; +Cc: rgooch, linux-kernel
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: Mon, 29 Nov 2004 00:05:37 +0100
From: Adrian Bunk <bunk@stusta.de>
To: rgooch@atnf.csiro.au
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] mtrr: some cleanups
The patch below contains the following changes:
- make some needlessly global code static
- remove the unused mtrr_if_name
diffstat output:
arch/i386/kernel/cpu/mtrr/cyrix.c | 4 ++--
arch/i386/kernel/cpu/mtrr/generic.c | 8 ++++----
arch/i386/kernel/cpu/mtrr/main.c | 6 +-----
arch/i386/kernel/cpu/mtrr/mtrr.h | 2 --
4 files changed, 7 insertions(+), 13 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/mtrr.h.old 2004-11-28 20:54:40.000000000 +0100
+++ linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/mtrr.h 2004-11-28 20:55:53.000000000 +0100
@@ -57,7 +57,6 @@
extern struct mtrr_ops generic_mtrr_ops;
-extern int generic_have_wrcomb(void);
extern int positive_have_wrcomb(void);
/* library functions for processor-specific routines */
@@ -96,4 +95,3 @@
void mtrr_state_warn(void);
char *mtrr_attrib_to_str(int x);
-extern char * mtrr_if_name[];
--- linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/cyrix.c.old 2004-11-28 20:53:32.000000000 +0100
+++ linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/cyrix.c 2004-11-28 20:53:48.000000000 +0100
@@ -218,12 +218,12 @@
mtrr_type type;
} arr_state_t;
-arr_state_t arr_state[8] __initdata = {
+static arr_state_t arr_state[8] __initdata = {
{0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL},
{0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}, {0UL, 0UL, 0UL}
};
-unsigned char ccr_state[7] __initdata = { 0, 0, 0, 0, 0, 0, 0 };
+static unsigned char ccr_state[7] __initdata = { 0, 0, 0, 0, 0, 0, 0 };
static void cyrix_set_all(void)
{
--- linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/generic.c.old 2004-11-28 20:54:02.000000000 +0100
+++ linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/generic.c 2004-11-28 20:55:32.000000000 +0100
@@ -19,7 +19,7 @@
};
static unsigned long smp_changes_mask;
-struct mtrr_state mtrr_state = {};
+static struct mtrr_state mtrr_state = {};
/* Get the MSR pair relating to a var range */
@@ -115,8 +115,8 @@
return -ENOSPC;
}
-void generic_get_mtrr(unsigned int reg, unsigned long *base,
- unsigned int *size, mtrr_type * type)
+static void generic_get_mtrr(unsigned int reg, unsigned long *base,
+ unsigned int *size, mtrr_type * type)
{
unsigned int mask_lo, mask_hi, base_lo, base_hi;
@@ -372,7 +372,7 @@
}
-int generic_have_wrcomb(void)
+static int generic_have_wrcomb(void)
{
unsigned long config, dummy;
rdmsr(MTRRcap_MSR, config, dummy);
--- linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/main.c.old 2004-11-28 20:56:00.000000000 +0100
+++ linux-2.6.10-rc2-mm3-full/arch/i386/kernel/cpu/mtrr/main.c 2004-11-28 20:56:26.000000000 +0100
@@ -57,10 +57,6 @@
struct mtrr_ops * mtrr_if = NULL;
-__initdata char *mtrr_if_name[] = {
- "none", "Intel", "AMD K6", "Cyrix ARR", "Centaur MCR"
-};
-
static void set_mtrr(unsigned int reg, unsigned long base,
unsigned long size, mtrr_type type);
@@ -100,7 +96,7 @@
}
/* This function returns the number of variable MTRRs */
-void __init set_num_var_ranges(void)
+static void __init set_num_var_ranges(void)
{
unsigned long config = 0, dummy;
-
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 -----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-15 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-15 21:40 [2.6 patch] mtrr: some cleanups (fwd) Adrian Bunk
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.