mtrr: some cleanups (fwd)
PATCH 1/1 mtrr: some cleanups (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: Mon, 29 Nov 2004 00:05:37 +0100
From: Adrian Bunk <[email protected]>
To: [email protected]
Cc: [email protected]
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 <[email protected]>
arch/i386/kernel/cpu/mtrr/mtrr.h renamed from arch/i386/kernel/cpu/mtrr/mtrr.h.old +0 -2
@@ -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[];
arch/i386/kernel/cpu/mtrr/cyrix.c renamed from arch/i386/kernel/cpu/mtrr/cyrix.c.old +2 -2
@@ -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 ) {
arch/i386/kernel/cpu/mtrr/generic.c renamed from arch/i386/kernel/cpu/mtrr/generic.c.old +4 -4
@@ -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);
arch/i386/kernel/cpu/mtrr/main.c renamed from arch/i386/kernel/cpu/mtrr/main.c.old +1 -5
@@ -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 [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 -----