
From: Adrian Bunk <bunk@stusta.de>

This is a megarollup of 56 patches which give various things static scope.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/kernel/apic.c              |    4 
 25-akpm/arch/i386/kernel/cpu/cyrix.c         |    2 
 25-akpm/arch/i386/kernel/cpuid.c             |    4 
 25-akpm/arch/i386/kernel/efi.c               |    8 
 25-akpm/arch/i386/kernel/i8259.c             |    4 
 25-akpm/arch/i386/kernel/io_apic.c           |    4 
 25-akpm/arch/i386/kernel/mpparse.c           |    6 
 25-akpm/arch/i386/kernel/msr.c               |    4 
 25-akpm/arch/i386/kernel/process.c           |    2 
 25-akpm/arch/i386/kernel/quirks.c            |    2 
 25-akpm/arch/i386/kernel/semaphore.c         |    8 
 25-akpm/arch/i386/kernel/setup.c             |    8 
 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/i386/kernel/traps.c             |    2 
 25-akpm/arch/i386/mach-default/topology.c    |    2 
 25-akpm/arch/i386/mach-visws/mpparse.c       |    2 
 25-akpm/arch/x86_64/kernel/apic.c            |    4 
 25-akpm/arch/x86_64/kernel/i8259.c           |    4 
 25-akpm/arch/x86_64/kernel/mpparse.c         |    4 
 25-akpm/arch/x86_64/kernel/msr.c             |    4 
 25-akpm/arch/x86_64/kernel/process.c         |    2 
 25-akpm/arch/x86_64/kernel/time.c            |    2 
 25-akpm/drivers/block/cfq-iosched.c          |    2 
 25-akpm/drivers/block/deadline-iosched.c     |    2 
 25-akpm/drivers/block/elevator.c             |    4 
 25-akpm/drivers/block/floppy.c               |    4 
 25-akpm/drivers/block/loop.c                 |    4 
 25-akpm/drivers/block/nbd.c                  |    6 
 25-akpm/drivers/block/rd.c                   |    2 
 25-akpm/drivers/block/umem.c                 |    4 
 25-akpm/drivers/block/xd.c                   |    2 
 25-akpm/drivers/scsi/53c700.c                |    4 
 25-akpm/drivers/scsi/53c700.h                |    1 
 25-akpm/drivers/scsi/dpt_i2o.c               |    2 
 25-akpm/drivers/scsi/ips.c                   |  244 +++++++++++++--------------
 25-akpm/drivers/scsi/ips.h                   |   12 -
 25-akpm/drivers/scsi/psi240i.c               |    8 
 25-akpm/drivers/scsi/psi240i.h               |    4 
 25-akpm/drivers/scsi/sr.c                    |    2 
 25-akpm/drivers/scsi/sym53c416.c             |    2 
 25-akpm/drivers/scsi/ultrastor.c             |    2 
 25-akpm/drivers/video/asiliantfb.c           |    9 
 25-akpm/drivers/video/cirrusfb.c             |   70 +++----
 25-akpm/drivers/video/i810/i810_gtf.c        |   12 -
 25-akpm/drivers/video/i810/i810_main.c       |   12 -
 25-akpm/drivers/video/matrox/matroxfb_base.c |    8 
 25-akpm/drivers/video/matrox/matroxfb_base.h |    1 
 25-akpm/drivers/video/sstfb.c                |   11 -
 25-akpm/fs/hpfs/alloc.c                      |    4 
 25-akpm/fs/hpfs/dentry.c                     |    6 
 25-akpm/fs/hpfs/dnode.c                      |   14 -
 25-akpm/fs/hpfs/hpfs_fn.h                    |    4 
 25-akpm/fs/hpfs/inode.c                      |    2 
 25-akpm/fs/hpfs/name.c                       |    4 
 25-akpm/fs/hpfs/super.c                      |    6 
 25-akpm/fs/lockd/clntproc.c                  |    4 
 25-akpm/fs/ncpfs/ncplib_kernel.c             |    2 
 25-akpm/fs/nfs/inode.c                       |    8 
 25-akpm/fs/nfs/mount_clnt.c                  |    4 
 25-akpm/fs/nfs/nfs4proc.c                    |    9 
 25-akpm/fs/nfs/nfsroot.c                     |    4 
 25-akpm/fs/nfs/read.c                        |    2 
 25-akpm/fs/nfs/write.c                       |   29 ++-
 25-akpm/include/asm-i386/cpu.h               |    1 
 25-akpm/include/asm-i386/hpet.h              |    2 
 25-akpm/include/asm-i386/mpspec.h            |    1 
 25-akpm/include/asm-i386/semaphore.h         |    5 
 25-akpm/include/asm-x86_64/mpspec.h          |    1 
 25-akpm/include/linux/audit.h                |   12 -
 25-akpm/include/linux/capability.h           |    2 
 25-akpm/include/linux/efi.h                  |    1 
 25-akpm/include/linux/lockd/lockd.h          |    2 
 25-akpm/include/linux/module.h               |    1 
 25-akpm/include/linux/nfs_fs.h               |   24 --
 25-akpm/include/linux/nfs_xdr.h              |    2 
 25-akpm/include/linux/slab.h                 |    1 
 25-akpm/include/linux/timex.h                |    2 
 25-akpm/kernel/acct.c                        |    2 
 25-akpm/kernel/audit.c                       |   17 +
 25-akpm/kernel/capability.c                  |    4 
 25-akpm/kernel/fork.c                        |   36 +--
 25-akpm/kernel/intermodule.c                 |    3 
 25-akpm/kernel/power/main.c                  |    2 
 25-akpm/kernel/resource.c                    |    2 
 25-akpm/kernel/signal.c                      |    2 
 25-akpm/kernel/sys.c                         |    4 
 25-akpm/kernel/timer.c                       |    4 
 25-akpm/lib/kernel_lock.c                    |    2 
 25-akpm/mm/shmem.c                           |    2 
 25-akpm/mm/thrash.c                          |    2 
 25-akpm/security/seclvl.c                    |    6 
 93 files changed, 364 insertions(+), 413 deletions(-)

diff -puN arch/i386/kernel/apic.c~make-various-things-static arch/i386/kernel/apic.c
--- 25/arch/i386/kernel/apic.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/apic.c	2005-03-06 21:58:45.000000000 -0800
@@ -931,7 +931,7 @@ void (*wait_timer_tick)(void) __initdata
 
 #define APIC_DIVISOR 16
 
-void __setup_APIC_LVTT(unsigned int clocks)
+static void __setup_APIC_LVTT(unsigned int clocks)
 {
 	unsigned int lvtt_value, tmp_value, ver;
 
@@ -981,7 +981,7 @@ static void __init setup_APIC_timer(unsi
  * APIC irq that way.
  */
 
-int __init calibrate_APIC_clock(void)
+static int __init calibrate_APIC_clock(void)
 {
 	unsigned long long t1 = 0, t2 = 0;
 	long tt1, tt2;
diff -puN arch/i386/kernel/cpu/cyrix.c~make-various-things-static arch/i386/kernel/cpu/cyrix.c
--- 25/arch/i386/kernel/cpu/cyrix.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/cpu/cyrix.c	2005-03-06 21:58:45.000000000 -0800
@@ -12,7 +12,7 @@
 /*
  * Read NSC/Cyrix DEVID registers (DIR) to get more detailed info. about the CPU
  */
-void __init do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
+static void __init do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
 {
 	unsigned char ccr2, ccr3;
 	unsigned long flags;
diff -puN arch/i386/kernel/cpuid.c~make-various-things-static arch/i386/kernel/cpuid.c
--- 25/arch/i386/kernel/cpuid.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/cpuid.c	2005-03-06 21:58:45.000000000 -0800
@@ -189,7 +189,7 @@ static struct notifier_block cpuid_class
 	.notifier_call = cpuid_class_cpu_callback,
 };
 
-int __init cpuid_init(void)
+static int __init cpuid_init(void)
 {
 	int i, err = 0;
 	i = 0;
@@ -227,7 +227,7 @@ out:
 	return err;
 }
 
-void __exit cpuid_exit(void)
+static void __exit cpuid_exit(void)
 {
 	int cpu = 0;
 
diff -puN arch/i386/kernel/efi.c~make-various-things-static arch/i386/kernel/efi.c
--- 25/arch/i386/kernel/efi.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/efi.c	2005-03-06 21:58:45.000000000 -0800
@@ -47,7 +47,7 @@ extern efi_status_t asmlinkage efi_call_
 
 struct efi efi;
 EXPORT_SYMBOL(efi);
-struct efi efi_phys __initdata;
+static struct efi efi_phys __initdata;
 struct efi_memory_map memmap __initdata;
 
 /*
@@ -152,7 +152,7 @@ phys_efi_set_virtual_address_map(unsigne
 	return status;
 }
 
-efi_status_t
+static efi_status_t
 phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
 {
 	efi_status_t status;
@@ -241,7 +241,8 @@ void __init efi_map_memmap(void)
 		printk(KERN_ERR PFX "Could not remap the EFI memmap!\n");
 }
 
-void __init print_efi_memmap(void)
+#if EFI_DEBUG
+static void __init print_efi_memmap(void)
 {
 	efi_memory_desc_t *md;
 	int i;
@@ -255,6 +256,7 @@ void __init print_efi_memmap(void)
 			(md->num_pages >> (20 - EFI_PAGE_SHIFT)));
 	}
 }
+#endif  /*  EFI_DEBUG  */
 
 /*
  * Walks the EFI memory map and calls CALLBACK once for each EFI
diff -puN arch/i386/kernel/i8259.c~make-various-things-static arch/i386/kernel/i8259.c
--- 25/arch/i386/kernel/i8259.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/i8259.c	2005-03-06 21:58:45.000000000 -0800
@@ -50,7 +50,7 @@ static void end_8259A_irq (unsigned int 
 
 #define shutdown_8259A_irq	disable_8259A_irq
 
-void mask_and_ack_8259A(unsigned int);
+static void mask_and_ack_8259A(unsigned int);
 
 unsigned int startup_8259A_irq(unsigned int irq)
 { 
@@ -169,7 +169,7 @@ static inline int i8259A_irq_real(unsign
  * first, _then_ send the EOI, and the order of EOI
  * to the two 8259s is important!
  */
-void mask_and_ack_8259A(unsigned int irq)
+static void mask_and_ack_8259A(unsigned int irq)
 {
 	unsigned int irqmask = 1 << irq;
 	unsigned long flags;
diff -puN arch/i386/kernel/io_apic.c~make-various-things-static arch/i386/kernel/io_apic.c
--- 25/arch/i386/kernel/io_apic.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/io_apic.c	2005-03-06 21:58:45.000000000 -0800
@@ -264,7 +264,7 @@ cpumask_t __cacheline_aligned pending_ir
 static int irqbalance_disabled = IRQBALANCE_CHECK_ARCH;
 static int physical_balance = 0;
 
-struct irq_cpu_info {
+static struct irq_cpu_info {
 	unsigned long * last_irq;
 	unsigned long * irq_delta;
 	unsigned long irq;
@@ -286,7 +286,7 @@ struct irq_cpu_info {
 #define BALANCED_IRQ_MORE_DELTA		(HZ/10)
 #define BALANCED_IRQ_LESS_DELTA		(HZ)
 
-long balanced_irq_interval = MAX_BALANCED_IRQ_INTERVAL;
+static long balanced_irq_interval = MAX_BALANCED_IRQ_INTERVAL;
 
 static unsigned long move(int curr_cpu, cpumask_t allowed_mask,
 			unsigned long now, int direction)
diff -puN arch/i386/kernel/mpparse.c~make-various-things-static arch/i386/kernel/mpparse.c
--- 25/arch/i386/kernel/mpparse.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/mpparse.c	2005-03-06 21:58:45.000000000 -0800
@@ -49,7 +49,7 @@ int mp_bus_id_to_node [MAX_MP_BUSSES];
 int mp_bus_id_to_local [MAX_MP_BUSSES];
 int quad_local_to_mp_bus_id [NR_CPUS/4][4];
 int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 };
-int mp_current_pci_id;
+static int mp_current_pci_id;
 
 /* I/O APIC entries */
 struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
@@ -119,7 +119,7 @@ static int MP_valid_apicid(int apicid, i
 }
 #endif
 
-void __init MP_processor_info (struct mpc_config_processor *m)
+static void __init MP_processor_info (struct mpc_config_processor *m)
 {
  	int ver, apicid;
 	physid_mask_t tmp;
@@ -863,7 +863,7 @@ void __init mp_register_lapic (
 #define MP_ISA_BUS		0
 #define MP_MAX_IOAPIC_PIN	127
 
-struct mp_ioapic_routing {
+static struct mp_ioapic_routing {
 	int			apic_id;
 	int			gsi_base;
 	int			gsi_end;
diff -puN arch/i386/kernel/msr.c~make-various-things-static arch/i386/kernel/msr.c
--- 25/arch/i386/kernel/msr.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/msr.c	2005-03-06 21:58:45.000000000 -0800
@@ -291,7 +291,7 @@ static struct notifier_block msr_class_c
 	.notifier_call = msr_class_cpu_callback,
 };
 
-int __init msr_init(void)
+static int __init msr_init(void)
 {
 	int i, err = 0;
 	i = 0;
@@ -328,7 +328,7 @@ out:
 	return err;
 }
 
-void __exit msr_exit(void)
+static void __exit msr_exit(void)
 {
 	int cpu = 0;
 	for_each_online_cpu(cpu)
diff -puN arch/i386/kernel/process.c~make-various-things-static arch/i386/kernel/process.c
--- 25/arch/i386/kernel/process.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/process.c	2005-03-06 21:58:45.000000000 -0800
@@ -61,7 +61,7 @@
 
 asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
 
-int hlt_counter;
+static int hlt_counter;
 
 unsigned long boot_option_idle_override = 0;
 EXPORT_SYMBOL(boot_option_idle_override);
diff -puN arch/i386/kernel/quirks.c~make-various-things-static arch/i386/kernel/quirks.c
--- 25/arch/i386/kernel/quirks.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/quirks.c	2005-03-06 21:58:45.000000000 -0800
@@ -7,7 +7,7 @@
 
 #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI)
 
-void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
+static void __devinit quirk_intel_irqbalance(struct pci_dev *dev)
 {
 	u8 config, rev;
 	u32 word;
diff -puN arch/i386/kernel/semaphore.c~make-various-things-static arch/i386/kernel/semaphore.c
--- 25/arch/i386/kernel/semaphore.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/semaphore.c	2005-03-06 21:58:45.000000000 -0800
@@ -49,12 +49,12 @@
  *    we cannot lose wakeup events.
  */
 
-fastcall void __up(struct semaphore *sem)
+static fastcall void __attribute_used__  __up(struct semaphore *sem)
 {
 	wake_up(&sem->wait);
 }
 
-fastcall void __sched __down(struct semaphore * sem)
+static fastcall void __attribute_used__ __sched __down(struct semaphore * sem)
 {
 	struct task_struct *tsk = current;
 	DECLARE_WAITQUEUE(wait, tsk);
@@ -91,7 +91,7 @@ fastcall void __sched __down(struct sema
 	tsk->state = TASK_RUNNING;
 }
 
-fastcall int __sched __down_interruptible(struct semaphore * sem)
+static fastcall int __attribute_used__ __sched __down_interruptible(struct semaphore * sem)
 {
 	int retval = 0;
 	struct task_struct *tsk = current;
@@ -154,7 +154,7 @@ fastcall int __sched __down_interruptibl
  * single "cmpxchg" without failure cases,
  * but then it wouldn't work on a 386.
  */
-fastcall int __down_trylock(struct semaphore * sem)
+static fastcall int __attribute_used__ __down_trylock(struct semaphore * sem)
 {
 	int sleepers;
 	unsigned long flags;
diff -puN arch/i386/kernel/setup.c~make-various-things-static arch/i386/kernel/setup.c
--- 25/arch/i386/kernel/setup.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/setup.c	2005-03-06 21:58:45.000000000 -0800
@@ -433,10 +433,10 @@ struct change_member {
 	struct e820entry *pbios; /* pointer to original bios entry */
 	unsigned long long addr; /* address for this change point */
 };
-struct change_member change_point_list[2*E820MAX] __initdata;
-struct change_member *change_point[2*E820MAX] __initdata;
-struct e820entry *overlap_list[E820MAX] __initdata;
-struct e820entry new_bios[E820MAX] __initdata;
+static struct change_member change_point_list[2*E820MAX] __initdata;
+static struct change_member *change_point[2*E820MAX] __initdata;
+static struct e820entry *overlap_list[E820MAX] __initdata;
+static struct e820entry new_bios[E820MAX] __initdata;
 
 static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
 {
diff -puN arch/i386/kernel/time.c~make-various-things-static arch/i386/kernel/time.c
--- 25/arch/i386/kernel/time.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/time.c	2005-03-06 21:58:45.000000000 -0800
@@ -404,7 +404,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~make-various-things-static arch/i386/kernel/time_hpet.c
--- 25/arch/i386/kernel/time_hpet.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/time_hpet.c	2005-03-06 21:58:45.000000000 -0800
@@ -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 @@ 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~make-various-things-static arch/i386/kernel/timers/timer_hpet.c
--- 25/arch/i386/kernel/timers/timer_hpet.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/timers/timer_hpet.c	2005-03-06 21:58:45.000000000 -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/i386/kernel/traps.c~make-various-things-static arch/i386/kernel/traps.c
--- 25/arch/i386/kernel/traps.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/kernel/traps.c	2005-03-06 21:58:45.000000000 -0800
@@ -891,7 +891,7 @@ fastcall void do_coprocessor_error(struc
 	math_error((void __user *)regs->eip);
 }
 
-void simd_math_error(void __user *eip)
+static void simd_math_error(void __user *eip)
 {
 	struct task_struct * task;
 	siginfo_t info;
diff -puN arch/i386/mach-default/topology.c~make-various-things-static arch/i386/mach-default/topology.c
--- 25/arch/i386/mach-default/topology.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/mach-default/topology.c	2005-03-06 21:58:45.000000000 -0800
@@ -30,7 +30,7 @@
 #include <linux/nodemask.h>
 #include <asm/cpu.h>
 
-struct i386_cpu cpu_devices[NR_CPUS];
+static struct i386_cpu cpu_devices[NR_CPUS];
 
 int arch_register_cpu(int num){
 	struct node *parent = NULL;
diff -puN arch/i386/mach-visws/mpparse.c~make-various-things-static arch/i386/mach-visws/mpparse.c
--- 25/arch/i386/mach-visws/mpparse.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/i386/mach-visws/mpparse.c	2005-03-06 21:58:45.000000000 -0800
@@ -36,7 +36,7 @@ unsigned int __initdata maxcpus = NR_CPU
  * No problem for Linux.
  */
 
-void __init MP_processor_info (struct mpc_config_processor *m)
+static void __init MP_processor_info (struct mpc_config_processor *m)
 {
  	int ver, logical_apicid;
 	physid_mask_t apic_cpus;
diff -puN arch/x86_64/kernel/apic.c~make-various-things-static arch/x86_64/kernel/apic.c
--- 25/arch/x86_64/kernel/apic.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/x86_64/kernel/apic.c	2005-03-06 21:58:45.000000000 -0800
@@ -686,7 +686,7 @@ void __init init_apic_mappings(void)
 
 #define APIC_DIVISOR 16
 
-void __setup_APIC_LVTT(unsigned int clocks)
+static void __setup_APIC_LVTT(unsigned int clocks)
 {
 	unsigned int lvtt_value, tmp_value, ver;
 
@@ -759,7 +759,7 @@ static void setup_APIC_timer(unsigned in
 
 #define TICK_COUNT 100000000
 
-int __init calibrate_APIC_clock(void)
+static int __init calibrate_APIC_clock(void)
 {
 	int apic, apic_start, tsc, tsc_start;
 	int result;
diff -puN arch/x86_64/kernel/i8259.c~make-various-things-static arch/x86_64/kernel/i8259.c
--- 25/arch/x86_64/kernel/i8259.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/x86_64/kernel/i8259.c	2005-03-06 21:58:45.000000000 -0800
@@ -149,7 +149,7 @@ static void end_8259A_irq (unsigned int 
 
 #define shutdown_8259A_irq	disable_8259A_irq
 
-void mask_and_ack_8259A(unsigned int);
+static void mask_and_ack_8259A(unsigned int);
 
 static unsigned int startup_8259A_irq(unsigned int irq)
 { 
@@ -273,7 +273,7 @@ static inline int i8259A_irq_real(unsign
  * first, _then_ send the EOI, and the order of EOI
  * to the two 8259s is important!
  */
-void mask_and_ack_8259A(unsigned int irq)
+static void mask_and_ack_8259A(unsigned int irq)
 {
 	unsigned int irqmask = 1 << irq;
 	unsigned long flags;
diff -puN arch/x86_64/kernel/mpparse.c~make-various-things-static arch/x86_64/kernel/mpparse.c
--- 25/arch/x86_64/kernel/mpparse.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/x86_64/kernel/mpparse.c	2005-03-06 21:58:45.000000000 -0800
@@ -46,7 +46,7 @@ unsigned char mp_bus_id_to_type [MAX_MP_
 int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 };
 cpumask_t pci_bus_to_cpumask [256] = { [0 ... 255] = CPU_MASK_ALL };
 
-int mp_current_pci_id = 0;
+static int mp_current_pci_id = 0;
 /* I/O APIC entries */
 struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
 
@@ -708,7 +708,7 @@ void __init mp_register_lapic (
 #define MP_ISA_BUS		0
 #define MP_MAX_IOAPIC_PIN	127
 
-struct mp_ioapic_routing {
+static struct mp_ioapic_routing {
 	int			apic_id;
 	int			gsi_start;
 	int			gsi_end;
diff -puN arch/x86_64/kernel/msr.c~make-various-things-static arch/x86_64/kernel/msr.c
--- 25/arch/x86_64/kernel/msr.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/x86_64/kernel/msr.c	2005-03-06 21:58:45.000000000 -0800
@@ -255,7 +255,7 @@ static struct file_operations msr_fops =
 	.open = msr_open,
 };
 
-int __init msr_init(void)
+static int __init msr_init(void)
 {
 	if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) {
 		printk(KERN_ERR "msr: unable to get major %d for msr\n",
@@ -266,7 +266,7 @@ int __init msr_init(void)
 	return 0;
 }
 
-void __exit msr_exit(void)
+static void __exit msr_exit(void)
 {
 	unregister_chrdev(MSR_MAJOR, "cpu/msr");
 }
diff -puN arch/x86_64/kernel/process.c~make-various-things-static arch/x86_64/kernel/process.c
--- 25/arch/x86_64/kernel/process.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/x86_64/kernel/process.c	2005-03-06 21:58:45.000000000 -0800
@@ -54,7 +54,7 @@ asmlinkage extern void ret_from_fork(voi
 
 unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
 
-atomic_t hlt_counter = ATOMIC_INIT(0);
+static atomic_t hlt_counter = ATOMIC_INIT(0);
 
 unsigned long boot_option_idle_override = 0;
 EXPORT_SYMBOL(boot_option_idle_override);
diff -puN arch/x86_64/kernel/time.c~make-various-things-static arch/x86_64/kernel/time.c
--- 25/arch/x86_64/kernel/time.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/arch/x86_64/kernel/time.c	2005-03-06 21:58:45.000000000 -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 drivers/block/cfq-iosched.c~make-various-things-static drivers/block/cfq-iosched.c
--- 25/drivers/block/cfq-iosched.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/cfq-iosched.c	2005-03-06 21:58:45.000000000 -0800
@@ -1790,7 +1790,7 @@ static struct sysfs_ops cfq_sysfs_ops = 
 	.store	= cfq_attr_store,
 };
 
-struct kobj_type cfq_ktype = {
+static struct kobj_type cfq_ktype = {
 	.sysfs_ops	= &cfq_sysfs_ops,
 	.default_attrs	= default_attrs,
 };
diff -puN drivers/block/deadline-iosched.c~make-various-things-static drivers/block/deadline-iosched.c
--- 25/drivers/block/deadline-iosched.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/deadline-iosched.c	2005-03-06 21:58:45.000000000 -0800
@@ -909,7 +909,7 @@ static struct sysfs_ops deadline_sysfs_o
 	.store	= deadline_attr_store,
 };
 
-struct kobj_type deadline_ktype = {
+static struct kobj_type deadline_ktype = {
 	.sysfs_ops	= &deadline_sysfs_ops,
 	.default_attrs	= default_attrs,
 };
diff -puN drivers/block/elevator.c~make-various-things-static drivers/block/elevator.c
--- 25/drivers/block/elevator.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/elevator.c	2005-03-06 21:58:45.000000000 -0800
@@ -92,7 +92,7 @@ inline int elv_try_last_merge(request_qu
 }
 EXPORT_SYMBOL(elv_try_last_merge);
 
-struct elevator_type *elevator_find(const char *name)
+static struct elevator_type *elevator_find(const char *name)
 {
 	struct elevator_type *e = NULL;
 	struct list_head *entry;
@@ -220,7 +220,7 @@ void elevator_exit(elevator_t *e)
 	kfree(e);
 }
 
-int elevator_global_init(void)
+static int elevator_global_init(void)
 {
 	return 0;
 }
diff -puN drivers/block/floppy.c~make-various-things-static drivers/block/floppy.c
--- 25/drivers/block/floppy.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/floppy.c	2005-03-06 21:58:45.000000000 -0800
@@ -4391,7 +4391,7 @@ static inline int  acpi_floppy_init(void
 static inline void acpi_floppy_exit(void) { }
 #endif
 
-int __init floppy_init(void)
+static int __init floppy_init(void)
 {
 	int i, unit, drive;
 	int err, dr;
@@ -4732,7 +4732,7 @@ static void floppy_release_irq_and_dma(v
 
 #ifdef MODULE
 
-char *floppy;
+static char *floppy;
 
 static void unregister_devfs_entries(int drive)
 {
diff -puN drivers/block/loop.c~make-various-things-static drivers/block/loop.c
--- 25/drivers/block/loop.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/loop.c	2005-03-06 21:58:45.000000000 -0800
@@ -1242,7 +1242,7 @@ int loop_unregister_transfer(int number)
 EXPORT_SYMBOL(loop_register_transfer);
 EXPORT_SYMBOL(loop_unregister_transfer);
 
-int __init loop_init(void)
+static int __init loop_init(void)
 {
 	int	i;
 
@@ -1317,7 +1317,7 @@ out_mem1:
 	return -ENOMEM;
 }
 
-void loop_exit(void)
+static void loop_exit(void)
 {
 	int i;
 
diff -puN drivers/block/nbd.c~make-various-things-static drivers/block/nbd.c
--- 25/drivers/block/nbd.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/nbd.c	2005-03-06 21:58:45.000000000 -0800
@@ -315,7 +315,7 @@ static inline int sock_recv_bvec(struct 
 }
 
 /* NULL returned = something went wrong, inform userspace */
-struct request *nbd_read_stat(struct nbd_device *lo)
+static struct request *nbd_read_stat(struct nbd_device *lo)
 {
 	int result;
 	struct nbd_reply reply;
@@ -377,7 +377,7 @@ harderror:
 	return NULL;
 }
 
-void nbd_do_it(struct nbd_device *lo)
+static void nbd_do_it(struct nbd_device *lo)
 {
 	struct request *req;
 
@@ -388,7 +388,7 @@ void nbd_do_it(struct nbd_device *lo)
 	return;
 }
 
-void nbd_clear_que(struct nbd_device *lo)
+static void nbd_clear_que(struct nbd_device *lo)
 {
 	struct request *req;
 
diff -puN drivers/block/rd.c~make-various-things-static drivers/block/rd.c
--- 25/drivers/block/rd.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/rd.c	2005-03-06 21:58:45.000000000 -0800
@@ -86,7 +86,7 @@ int rd_size = CONFIG_BLK_DEV_RAM_SIZE;		
  * behaviour. The default is still BLOCK_SIZE (needed by rd_load_image that
  * supposes the filesystem in the image uses a BLOCK_SIZE blocksize).
  */
-int rd_blocksize = BLOCK_SIZE;			/* blocksize of the RAM disks */
+static int rd_blocksize = BLOCK_SIZE;		/* blocksize of the RAM disks */
 
 /*
  * Copyright (C) 2000 Linus Torvalds.
diff -puN drivers/block/umem.c~make-various-things-static drivers/block/umem.c
--- 25/drivers/block/umem.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/umem.c	2005-03-06 21:58:45.000000000 -0800
@@ -1181,7 +1181,7 @@ static struct pci_driver mm_pci_driver =
 -----------------------------------------------------------------------------------
 */
 
-int __init mm_init(void)
+static int __init mm_init(void)
 {
 	int retval, i;
 	int err;
@@ -1232,7 +1232,7 @@ out:
 --                             mm_cleanup
 -----------------------------------------------------------------------------------
 */
-void __exit mm_cleanup(void)
+static void __exit mm_cleanup(void)
 {
 	int i;
 
diff -puN drivers/block/xd.c~make-various-things-static drivers/block/xd.c
--- 25/drivers/block/xd.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/block/xd.c	2005-03-06 21:58:45.000000000 -0800
@@ -67,7 +67,7 @@ static int xd[5] = { -1,-1,-1,-1, };
 /* Above may need to be increased if a problem with the 2nd drive detection
    (ST11M controller) or resetting a controller (WD) appears */
 
-XD_INFO xd_info[XD_MAXDRIVES];
+static XD_INFO xd_info[XD_MAXDRIVES];
 
 /* If you try this driver and find that your card is not detected by the driver at bootup, you need to add your BIOS
    signature and details to the following list of signatures. A BIOS signature is a string embedded into the first
diff -puN drivers/scsi/53c700.c~make-various-things-static drivers/scsi/53c700.c
--- 25/drivers/scsi/53c700.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/53c700.c	2005-03-06 21:58:45.000000000 -0800
@@ -167,6 +167,7 @@ MODULE_LICENSE("GPL");
 #include "53c700_d.h"
 
 
+STATIC irqreturn_t NCR_700_intr(int irq, void *dev_id, struct pt_regs *regs);
 STATIC int NCR_700_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *));
 STATIC int NCR_700_abort(struct scsi_cmnd * SCpnt);
 STATIC int NCR_700_bus_reset(struct scsi_cmnd * SCpnt);
@@ -1494,7 +1495,7 @@ NCR_700_start_command(struct scsi_cmnd *
 	return 1;
 }
 
-irqreturn_t
+STATIC irqreturn_t
 NCR_700_intr(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct Scsi_Host *host = (struct Scsi_Host *)dev_id;
@@ -2169,7 +2170,6 @@ STATIC struct device_attribute *NCR_700_
 
 EXPORT_SYMBOL(NCR_700_detect);
 EXPORT_SYMBOL(NCR_700_release);
-EXPORT_SYMBOL(NCR_700_intr);
 
 static struct spi_function_template NCR_700_transport_functions =  {
 	.set_period	= NCR_700_set_period,
diff -puN drivers/scsi/53c700.h~make-various-things-static drivers/scsi/53c700.h
--- 25/drivers/scsi/53c700.h~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/53c700.h	2005-03-06 21:58:45.000000000 -0800
@@ -63,7 +63,6 @@ struct Scsi_Host *NCR_700_detect(struct 
 		struct NCR_700_Host_Parameters *, struct device *,
 		unsigned long, u8);
 int NCR_700_release(struct Scsi_Host *host);
-irqreturn_t NCR_700_intr(int, void *, struct pt_regs *);
 
 
 enum NCR_700_Host_State {
diff -puN drivers/scsi/dpt_i2o.c~make-various-things-static drivers/scsi/dpt_i2o.c
--- 25/drivers/scsi/dpt_i2o.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/dpt_i2o.c	2005-03-06 21:58:45.000000000 -0800
@@ -107,7 +107,7 @@ static dpt_sig_S DPTI_sig = {
  *============================================================================
  */
 
-DECLARE_MUTEX(adpt_configuration_lock);
+static DECLARE_MUTEX(adpt_configuration_lock);
 
 static struct i2o_sys_tbl *sys_tbl = NULL;
 static int sys_tbl_ind = 0;
diff -puN drivers/scsi/ips.c~make-various-things-static drivers/scsi/ips.c
--- 25/drivers/scsi/ips.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/ips.c	2005-03-06 21:58:45.000000000 -0800
@@ -246,6 +246,117 @@ module_param(ips, charp, 0);
 #endif
 
 /*
+ * Function prototypes
+ */
+static int ips_detect(Scsi_Host_Template *);
+static int ips_release(struct Scsi_Host *);
+static int ips_eh_abort(Scsi_Cmnd *);
+static int ips_eh_reset(Scsi_Cmnd *);
+static int ips_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
+static const char *ips_info(struct Scsi_Host *);
+static irqreturn_t do_ipsintr(int, void *, struct pt_regs *);
+static int ips_hainit(ips_ha_t *);
+static int ips_map_status(ips_ha_t *, ips_scb_t *, ips_stat_t *);
+static int ips_send_wait(ips_ha_t *, ips_scb_t *, int, int);
+static int ips_send_cmd(ips_ha_t *, ips_scb_t *);
+static int ips_online(ips_ha_t *, ips_scb_t *);
+static int ips_inquiry(ips_ha_t *, ips_scb_t *);
+static int ips_rdcap(ips_ha_t *, ips_scb_t *);
+static int ips_msense(ips_ha_t *, ips_scb_t *);
+static int ips_reqsen(ips_ha_t *, ips_scb_t *);
+static int ips_deallocatescbs(ips_ha_t *, int);
+static int ips_allocatescbs(ips_ha_t *);
+static int ips_reset_copperhead(ips_ha_t *);
+static int ips_reset_copperhead_memio(ips_ha_t *);
+static int ips_reset_morpheus(ips_ha_t *);
+static int ips_issue_copperhead(ips_ha_t *, ips_scb_t *);
+static int ips_issue_copperhead_memio(ips_ha_t *, ips_scb_t *);
+static int ips_issue_i2o(ips_ha_t *, ips_scb_t *);
+static int ips_issue_i2o_memio(ips_ha_t *, ips_scb_t *);
+static int ips_isintr_copperhead(ips_ha_t *);
+static int ips_isintr_copperhead_memio(ips_ha_t *);
+static int ips_isintr_morpheus(ips_ha_t *);
+static int ips_wait(ips_ha_t *, int, int);
+static int ips_write_driver_status(ips_ha_t *, int);
+static int ips_read_adapter_status(ips_ha_t *, int);
+static int ips_read_subsystem_parameters(ips_ha_t *, int);
+static int ips_read_config(ips_ha_t *, int);
+static int ips_clear_adapter(ips_ha_t *, int);
+static int ips_readwrite_page5(ips_ha_t *, int, int);
+static int ips_init_copperhead(ips_ha_t *);
+static int ips_init_copperhead_memio(ips_ha_t *);
+static int ips_init_morpheus(ips_ha_t *);
+static int ips_isinit_copperhead(ips_ha_t *);
+static int ips_isinit_copperhead_memio(ips_ha_t *);
+static int ips_isinit_morpheus(ips_ha_t *);
+static int ips_erase_bios(ips_ha_t *);
+static int ips_program_bios(ips_ha_t *, char *, uint32_t, uint32_t);
+static int ips_verify_bios(ips_ha_t *, char *, uint32_t, uint32_t);
+static int ips_erase_bios_memio(ips_ha_t *);
+static int ips_program_bios_memio(ips_ha_t *, char *, uint32_t, uint32_t);
+static int ips_verify_bios_memio(ips_ha_t *, char *, uint32_t, uint32_t);
+static int ips_flash_copperhead(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
+static int ips_flash_bios(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
+static int ips_flash_firmware(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
+static void ips_free_flash_copperhead(ips_ha_t * ha);
+static void ips_get_bios_version(ips_ha_t *, int);
+static void ips_identify_controller(ips_ha_t *);
+static void ips_chkstatus(ips_ha_t *, IPS_STATUS *);
+static void ips_enable_int_copperhead(ips_ha_t *);
+static void ips_enable_int_copperhead_memio(ips_ha_t *);
+static void ips_enable_int_morpheus(ips_ha_t *);
+static int ips_intr_copperhead(ips_ha_t *);
+static int ips_intr_morpheus(ips_ha_t *);
+static void ips_next(ips_ha_t *, int);
+static void ipsintr_blocking(ips_ha_t *, struct ips_scb *);
+static void ipsintr_done(ips_ha_t *, struct ips_scb *);
+static void ips_done(ips_ha_t *, ips_scb_t *);
+static void ips_free(ips_ha_t *);
+static void ips_init_scb(ips_ha_t *, ips_scb_t *);
+static void ips_freescb(ips_ha_t *, ips_scb_t *);
+static void ips_setup_funclist(ips_ha_t *);
+static void ips_statinit(ips_ha_t *);
+static void ips_statinit_memio(ips_ha_t *);
+static void ips_fix_ffdc_time(ips_ha_t *, ips_scb_t *, time_t);
+static void ips_ffdc_reset(ips_ha_t *, int);
+static void ips_ffdc_time(ips_ha_t *);
+static uint32_t ips_statupd_copperhead(ips_ha_t *);
+static uint32_t ips_statupd_copperhead_memio(ips_ha_t *);
+static uint32_t ips_statupd_morpheus(ips_ha_t *);
+static ips_scb_t *ips_getscb(ips_ha_t *);
+static void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *);
+static void ips_putq_wait_tail(ips_wait_queue_t *, Scsi_Cmnd *);
+static void ips_putq_copp_tail(ips_copp_queue_t *,
+				      ips_copp_wait_item_t *);
+static ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *);
+static ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *);
+static Scsi_Cmnd *ips_removeq_wait_head(ips_wait_queue_t *);
+static Scsi_Cmnd *ips_removeq_wait(ips_wait_queue_t *, Scsi_Cmnd *);
+static ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *,
+						     ips_copp_wait_item_t *);
+static ips_copp_wait_item_t *ips_removeq_copp_head(ips_copp_queue_t *);
+
+static int ips_is_passthru(Scsi_Cmnd *);
+static int ips_make_passthru(ips_ha_t *, Scsi_Cmnd *, ips_scb_t *, int);
+static int ips_usrcmd(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
+static void ips_cleanup_passthru(ips_ha_t *, ips_scb_t *);
+static void ips_scmd_buf_write(Scsi_Cmnd * scmd, void *data,
+			       unsigned int count);
+static void ips_scmd_buf_read(Scsi_Cmnd * scmd, void *data, unsigned int count);
+
+static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
+static int ips_host_info(ips_ha_t *, char *, off_t, int);
+static void copy_mem_info(IPS_INFOSTR *, char *, int);
+static int copy_info(IPS_INFOSTR *, char *, ...);
+static int ips_get_version_info(ips_ha_t * ha, dma_addr_t, int intr);
+static void ips_version_check(ips_ha_t * ha, int intr);
+static int ips_abort_init(ips_ha_t * ha, int index);
+static int ips_init_phase2(int index);
+
+static int ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr);
+static int ips_register_scsi(int index);
+
+/*
  * global variables
  */
 static const char ips_name[] = "ips";
@@ -293,7 +404,7 @@ static Scsi_Host_Template ips_driver_tem
 #endif
 };
 
-IPS_DEFINE_COMPAT_TABLE( Compatable );	/* Version Compatability Table      */
+static IPS_DEFINE_COMPAT_TABLE( Compatable );	/* Version Compatability Table      */
 
 
 /* This table describes all ServeRAID Adapters */
@@ -311,7 +422,7 @@ static char ips_hot_plug_name[] = "ips";
 static int __devinit  ips_insert_device(struct pci_dev *pci_dev, const struct pci_device_id *ent);
 static void __devexit ips_remove_device(struct pci_dev *pci_dev);
    
-struct pci_driver ips_pci_driver = {
+static struct pci_driver ips_pci_driver = {
 	.name		= ips_hot_plug_name,
 	.id_table	= ips_pci_table,
 	.probe		= ips_insert_device,
@@ -408,119 +519,6 @@ static char ips_command_direction[] = {
 	IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK, IPS_DATA_UNK
 };
 
-/*
- * Function prototypes
- */
-int ips_detect(Scsi_Host_Template *);
-int ips_release(struct Scsi_Host *);
-int ips_eh_abort(Scsi_Cmnd *);
-int ips_eh_reset(Scsi_Cmnd *);
-int ips_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
-const char *ips_info(struct Scsi_Host *);
-irqreturn_t do_ipsintr(int, void *, struct pt_regs *);
-static int ips_hainit(ips_ha_t *);
-static int ips_map_status(ips_ha_t *, ips_scb_t *, ips_stat_t *);
-static int ips_send_wait(ips_ha_t *, ips_scb_t *, int, int);
-static int ips_send_cmd(ips_ha_t *, ips_scb_t *);
-static int ips_online(ips_ha_t *, ips_scb_t *);
-static int ips_inquiry(ips_ha_t *, ips_scb_t *);
-static int ips_rdcap(ips_ha_t *, ips_scb_t *);
-static int ips_msense(ips_ha_t *, ips_scb_t *);
-static int ips_reqsen(ips_ha_t *, ips_scb_t *);
-static int ips_deallocatescbs(ips_ha_t *, int);
-static int ips_allocatescbs(ips_ha_t *);
-static int ips_reset_copperhead(ips_ha_t *);
-static int ips_reset_copperhead_memio(ips_ha_t *);
-static int ips_reset_morpheus(ips_ha_t *);
-static int ips_issue_copperhead(ips_ha_t *, ips_scb_t *);
-static int ips_issue_copperhead_memio(ips_ha_t *, ips_scb_t *);
-static int ips_issue_i2o(ips_ha_t *, ips_scb_t *);
-static int ips_issue_i2o_memio(ips_ha_t *, ips_scb_t *);
-static int ips_isintr_copperhead(ips_ha_t *);
-static int ips_isintr_copperhead_memio(ips_ha_t *);
-static int ips_isintr_morpheus(ips_ha_t *);
-static int ips_wait(ips_ha_t *, int, int);
-static int ips_write_driver_status(ips_ha_t *, int);
-static int ips_read_adapter_status(ips_ha_t *, int);
-static int ips_read_subsystem_parameters(ips_ha_t *, int);
-static int ips_read_config(ips_ha_t *, int);
-static int ips_clear_adapter(ips_ha_t *, int);
-static int ips_readwrite_page5(ips_ha_t *, int, int);
-static int ips_init_copperhead(ips_ha_t *);
-static int ips_init_copperhead_memio(ips_ha_t *);
-static int ips_init_morpheus(ips_ha_t *);
-static int ips_isinit_copperhead(ips_ha_t *);
-static int ips_isinit_copperhead_memio(ips_ha_t *);
-static int ips_isinit_morpheus(ips_ha_t *);
-static int ips_erase_bios(ips_ha_t *);
-static int ips_program_bios(ips_ha_t *, char *, uint32_t, uint32_t);
-static int ips_verify_bios(ips_ha_t *, char *, uint32_t, uint32_t);
-static int ips_erase_bios_memio(ips_ha_t *);
-static int ips_program_bios_memio(ips_ha_t *, char *, uint32_t, uint32_t);
-static int ips_verify_bios_memio(ips_ha_t *, char *, uint32_t, uint32_t);
-static int ips_flash_copperhead(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
-static int ips_flash_bios(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
-static int ips_flash_firmware(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
-static void ips_free_flash_copperhead(ips_ha_t * ha);
-static void ips_get_bios_version(ips_ha_t *, int);
-static void ips_identify_controller(ips_ha_t *);
-static void ips_chkstatus(ips_ha_t *, IPS_STATUS *);
-static void ips_enable_int_copperhead(ips_ha_t *);
-static void ips_enable_int_copperhead_memio(ips_ha_t *);
-static void ips_enable_int_morpheus(ips_ha_t *);
-static int ips_intr_copperhead(ips_ha_t *);
-static int ips_intr_morpheus(ips_ha_t *);
-static void ips_next(ips_ha_t *, int);
-static void ipsintr_blocking(ips_ha_t *, struct ips_scb *);
-static void ipsintr_done(ips_ha_t *, struct ips_scb *);
-static void ips_done(ips_ha_t *, ips_scb_t *);
-static void ips_free(ips_ha_t *);
-static void ips_init_scb(ips_ha_t *, ips_scb_t *);
-static void ips_freescb(ips_ha_t *, ips_scb_t *);
-static void ips_setup_funclist(ips_ha_t *);
-static void ips_statinit(ips_ha_t *);
-static void ips_statinit_memio(ips_ha_t *);
-static void ips_fix_ffdc_time(ips_ha_t *, ips_scb_t *, time_t);
-static void ips_ffdc_reset(ips_ha_t *, int);
-static void ips_ffdc_time(ips_ha_t *);
-static uint32_t ips_statupd_copperhead(ips_ha_t *);
-static uint32_t ips_statupd_copperhead_memio(ips_ha_t *);
-static uint32_t ips_statupd_morpheus(ips_ha_t *);
-static ips_scb_t *ips_getscb(ips_ha_t *);
-static void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *);
-static void ips_putq_wait_tail(ips_wait_queue_t *, Scsi_Cmnd *);
-static void ips_putq_copp_tail(ips_copp_queue_t *,
-				      ips_copp_wait_item_t *);
-static ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *);
-static ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *);
-static Scsi_Cmnd *ips_removeq_wait_head(ips_wait_queue_t *);
-static Scsi_Cmnd *ips_removeq_wait(ips_wait_queue_t *, Scsi_Cmnd *);
-static ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *,
-						     ips_copp_wait_item_t *);
-static ips_copp_wait_item_t *ips_removeq_copp_head(ips_copp_queue_t *);
-
-static int ips_is_passthru(Scsi_Cmnd *);
-static int ips_make_passthru(ips_ha_t *, Scsi_Cmnd *, ips_scb_t *, int);
-static int ips_usrcmd(ips_ha_t *, ips_passthru_t *, ips_scb_t *);
-static void ips_cleanup_passthru(ips_ha_t *, ips_scb_t *);
-static void ips_scmd_buf_write(Scsi_Cmnd * scmd, void *data,
-			       unsigned int count);
-static void ips_scmd_buf_read(Scsi_Cmnd * scmd, void *data, unsigned int count);
-
-int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
-static int ips_host_info(ips_ha_t *, char *, off_t, int);
-static void copy_mem_info(IPS_INFOSTR *, char *, int);
-static int copy_info(IPS_INFOSTR *, char *, ...);
-static int ips_get_version_info(ips_ha_t * ha, dma_addr_t, int intr);
-static void ips_version_check(ips_ha_t * ha, int intr);
-static int ips_abort_init(ips_ha_t * ha, int index);
-static int ips_init_phase2(int index);
-
-static int ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr);
-static int ips_register_scsi(int index);
-/*--------------------------------------------------------------------------*/
-/* Exported Functions                                                       */
-/*--------------------------------------------------------------------------*/
 
 /****************************************************************************/
 /*                                                                          */
@@ -589,7 +587,7 @@ __setup("ips=", ips_setup);
 /* NOTE: this routine is called under the io_request_lock spinlock          */
 /*                                                                          */
 /****************************************************************************/
-int
+static int
 ips_detect(Scsi_Host_Template * SHT)
 {
 	int i;
@@ -678,7 +676,7 @@ ips_setup_funclist(ips_ha_t * ha)
 /*   Remove a driver                                                        */
 /*                                                                          */
 /****************************************************************************/
-int
+static int
 ips_release(struct Scsi_Host *sh)
 {
 	ips_scb_t *scb;
@@ -874,7 +872,7 @@ ips_eh_abort(Scsi_Cmnd * SC)
 /* NOTE: this routine is called under the io_request_lock spinlock          */
 /*                                                                          */
 /****************************************************************************/
-int
+static int
 ips_eh_reset(Scsi_Cmnd * SC)
 {
 	int ret;
@@ -1074,7 +1072,7 @@ ips_eh_reset(Scsi_Cmnd * SC)
 /*    Linux obtains io_request_lock before calling this function            */
 /*                                                                          */
 /****************************************************************************/
-int
+static int
 ips_queue(Scsi_Cmnd * SC, void (*done) (Scsi_Cmnd *))
 {
 	ips_ha_t *ha;
@@ -1297,7 +1295,7 @@ ips_select_queue_depth(struct Scsi_Host 
 /*   Set queue depths on devices once scan is complete                      */
 /*                                                                          */
 /****************************************************************************/
-int
+static int
 ips_slave_configure(Scsi_Device * SDptr)
 {
 	ips_ha_t *ha;
@@ -1323,7 +1321,7 @@ ips_slave_configure(Scsi_Device * SDptr)
 /*   Wrapper for the interrupt handler                                      */
 /*                                                                          */
 /****************************************************************************/
-irqreturn_t
+static irqreturn_t
 do_ipsintr(int irq, void *dev_id, struct pt_regs * regs)
 {
 	ips_ha_t *ha;
@@ -1502,7 +1500,7 @@ ips_intr_morpheus(ips_ha_t * ha)
 /*   Return info about the driver                                           */
 /*                                                                          */
 /****************************************************************************/
-const char *
+static const char *
 ips_info(struct Scsi_Host *SH)
 {
 	static char buffer[256];
@@ -1540,7 +1538,7 @@ ips_info(struct Scsi_Host *SH)
 /*   The passthru interface for the driver                                  */
 /*                                                                          */
 /****************************************************************************/
-int
+static int
 ips_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset,
 	      int length, int func)
 {
diff -puN drivers/scsi/ips.h~make-various-things-static drivers/scsi/ips.h
--- 25/drivers/scsi/ips.h~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/ips.h	2005-03-06 21:58:45.000000000 -0800
@@ -53,14 +53,6 @@
    #include <asm/uaccess.h>
    #include <asm/io.h>
 
-   /* Prototypes */
-   extern int ips_detect(Scsi_Host_Template *);
-   extern int ips_release(struct Scsi_Host *);
-   extern int ips_eh_abort(Scsi_Cmnd *);
-   extern int ips_eh_reset(Scsi_Cmnd *);
-   extern int ips_queue(Scsi_Cmnd *, void (*) (Scsi_Cmnd *));
-   extern const char * ips_info(struct Scsi_Host *);
-
    /*
     * Some handy macros
     */
@@ -457,10 +449,10 @@
    static void ips_select_queue_depth(struct Scsi_Host *, Scsi_Device *);
    static int ips_biosparam(Disk *disk, kdev_t dev, int geom[]);
 #else
-   int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
+   static int ips_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
    static int ips_biosparam(struct scsi_device *sdev, struct block_device *bdev,
 		sector_t capacity, int geom[]);
-   int ips_slave_configure(Scsi_Device *SDptr);
+   static int ips_slave_configure(Scsi_Device *SDptr);
 #endif
 
 /*
diff -puN drivers/scsi/psi240i.c~make-various-things-static drivers/scsi/psi240i.c
--- 25/drivers/scsi/psi240i.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/psi240i.c	2005-03-06 21:58:45.000000000 -0800
@@ -390,7 +390,7 @@ static irqreturn_t do_Irq_Handler (int i
  *	Returns:		Status code.
  *
  ****************************************************************/
-int Psi240i_QueueCommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
+static int Psi240i_QueueCommand (Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
 	{
 	UCHAR		   *cdb = (UCHAR *)SCpnt->cmnd;					// Pointer to SCSI CDB
 	PADAPTER240I	padapter = HOSTDATA (SCpnt->device->host); 			// Pointer to adapter control structure
@@ -509,7 +509,7 @@ int Psi240i_QueueCommand (Scsi_Cmnd *SCp
  *	Returns:		Nothing.
  *
  **************************************************************************/
-void ReadChipMemory (void *pdata, USHORT base, USHORT length, USHORT port)
+static void ReadChipMemory (void *pdata, USHORT base, USHORT length, USHORT port)
 	{
 	USHORT	z, zz;
 	UCHAR	*pd = (UCHAR *)pdata;
@@ -538,7 +538,7 @@ void ReadChipMemory (void *pdata, USHORT
  *	Returns:		Number of adapters found.
  *
  ****************************************************************/
-int Psi240i_Detect (Scsi_Host_Template *tpnt)
+static int Psi240i_Detect (Scsi_Host_Template *tpnt)
 	{
 	int					board;
 	int					count = 0;
@@ -654,7 +654,7 @@ static int Psi240i_Release(struct Scsi_H
  *	Returns:		zero.
  *
  ****************************************************************/
-int Psi240i_BiosParam (struct scsi_device *sdev, struct block_device *dev,
+static int Psi240i_BiosParam (struct scsi_device *sdev, struct block_device *dev,
 		sector_t capacity, int geom[])
 	{
 	POUR_DEVICE	pdev;
diff -puN drivers/scsi/psi240i.h~make-various-things-static drivers/scsi/psi240i.h
--- 25/drivers/scsi/psi240i.h~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/psi240i.h	2005-03-06 21:58:45.000000000 -0800
@@ -309,11 +309,7 @@ typedef struct _IDENTIFY_DATA2 {
 #endif	// PSI_EIDE_SCSIOP
 
 // function prototypes
-int Psi240i_Detect			(Scsi_Host_Template *tpnt);
 int Psi240i_Command			(Scsi_Cmnd *SCpnt);
-int Psi240i_QueueCommand	(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *));
 int Psi240i_Abort			(Scsi_Cmnd *SCpnt);
 int Psi240i_Reset			(Scsi_Cmnd *SCpnt, unsigned int flags);
-int Psi240i_BiosParam		(struct scsi_device *sdev, struct block_device *bdev,
-					sector_t capacity, int geom[]);
 #endif
diff -puN drivers/scsi/sr.c~make-various-things-static drivers/scsi/sr.c
--- 25/drivers/scsi/sr.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/sr.c	2005-03-06 21:58:45.000000000 -0800
@@ -511,7 +511,7 @@ static int sr_block_media_changed(struct
 	return cdrom_media_changed(&cd->cdi);
 }
 
-struct block_device_operations sr_bdops =
+static struct block_device_operations sr_bdops =
 {
 	.owner		= THIS_MODULE,
 	.open		= sr_block_open,
diff -puN drivers/scsi/sym53c416.c~make-various-things-static drivers/scsi/sym53c416.c
--- 25/drivers/scsi/sym53c416.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/sym53c416.c	2005-03-06 21:58:45.000000000 -0800
@@ -616,7 +616,7 @@ static struct isapnp_device_id id_table[
 
 MODULE_DEVICE_TABLE(isapnp, id_table);
 
-void sym53c416_probe(void)
+static void sym53c416_probe(void)
 {
 	int *base = probeaddrs;
 	int ints[2];
diff -puN drivers/scsi/ultrastor.c~make-various-things-static drivers/scsi/ultrastor.c
--- 25/drivers/scsi/ultrastor.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/scsi/ultrastor.c	2005-03-06 21:58:45.000000000 -0800
@@ -259,7 +259,7 @@ static struct ultrastor_config
 } config = {0};
 
 /* Set this to 1 to reset the SCSI bus on error.  */
-int ultrastor_bus_reset;
+static int ultrastor_bus_reset;
 
 
 /* Allowed BIOS base addresses (NULL indicates reserved) */
diff -puN drivers/video/asiliantfb.c~make-various-things-static drivers/video/asiliantfb.c
--- 25/drivers/video/asiliantfb.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/video/asiliantfb.c	2005-03-06 21:58:45.000000000 -0800
@@ -46,7 +46,7 @@
 #include <asm/io.h>
 
 /* Built in clock of the 69030 */
-const unsigned Fref = 14318180;
+static const unsigned Fref = 14318180;
 
 #define mmio_base (p->screen_base + 0x400000)
 
@@ -91,11 +91,6 @@ static void mm_write_ar(struct fb_info *
 }
 #define write_ar(num, val)	mm_write_ar(p, num, val)
 
-/*
- * Exported functions
- */
-int asiliantfb_init(void);
-
 static int asiliantfb_pci_init(struct pci_dev *dp, const struct pci_device_id *);
 static int asiliantfb_check_var(struct fb_var_screeninfo *var,
 				struct fb_info *info);
@@ -604,7 +599,7 @@ static struct pci_driver asiliantfb_driv
 	.remove =	__devexit_p(asiliantfb_remove),
 };
 
-int __init asiliantfb_init(void)
+static int __init asiliantfb_init(void)
 {
 	if (fb_get_options("asiliantfb", NULL))
 		return -ENODEV;
diff -puN drivers/video/cirrusfb.c~make-various-things-static drivers/video/cirrusfb.c
--- 25/drivers/video/cirrusfb.c~make-various-things-static	2005-03-06 21:58:44.000000000 -0800
+++ 25-akpm/drivers/video/cirrusfb.c	2005-03-06 21:58:45.000000000 -0800
@@ -515,23 +515,25 @@ static const struct {
 
 
 /*--- Interface used by the world ------------------------------------------*/
-int cirrusfb_init (void);
-int cirrusfb_setup (char *options);
+static int cirrusfb_init (void);
+#ifndef MODULE
+static int cirrusfb_setup (char *options);
+#endif
 
-int cirrusfb_open (struct fb_info *info, int user);
-int cirrusfb_release (struct fb_info *info, int user);
-int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
-			unsigned blue, unsigned transp,
-			struct fb_info *info);
-int cirrusfb_check_var (struct fb_var_screeninfo *var,
-			struct fb_info *info);
-int cirrusfb_set_par (struct fb_info *info);
-int cirrusfb_pan_display (struct fb_var_screeninfo *var,
-			  struct fb_info *info);
-int cirrusfb_blank (int blank_mode, struct fb_info *info);
-void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region);
-void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
-void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image);
+static int cirrusfb_open (struct fb_info *info, int user);
+static int cirrusfb_release (struct fb_info *info, int user);
+static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
+			       unsigned blue, unsigned transp,
+			       struct fb_info *info);
+static int cirrusfb_check_var (struct fb_var_screeninfo *var,
+			       struct fb_info *info);
+static int cirrusfb_set_par (struct fb_info *info);
+static int cirrusfb_pan_display (struct fb_var_screeninfo *var,
+				 struct fb_info *info);
+static int cirrusfb_blank (int blank_mode, struct fb_info *info);
+static void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region);
+static void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
+static void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image);
 
 /* function table of the above functions */
 static struct fb_ops cirrusfb_ops = {
@@ -600,7 +602,7 @@ static void cirrusfb_dbg_print_byte (con
 static int opencount = 0;
 
 /*--- Open /dev/fbx ---------------------------------------------------------*/
-int cirrusfb_open (struct fb_info *info, int user)
+static int cirrusfb_open (struct fb_info *info, int user)
 {
 	if (opencount++ == 0)
 		switch_monitor (info->par, 1);
@@ -608,7 +610,7 @@ int cirrusfb_open (struct fb_info *info,
 }
 
 /*--- Close /dev/fbx --------------------------------------------------------*/
-int cirrusfb_release (struct fb_info *info, int user)
+static int cirrusfb_release (struct fb_info *info, int user)
 {
 	if (--opencount == 0)
 		switch_monitor (info->par, 0);
@@ -660,8 +662,8 @@ static long cirrusfb_get_mclk (long freq
 	return mclk;
 }
 
-int cirrusfb_check_var(struct fb_var_screeninfo *var,
-		       struct fb_info *info)
+static int cirrusfb_check_var(struct fb_var_screeninfo *var,
+			      struct fb_info *info)
 {
 	struct cirrusfb_info *cinfo = info->par;
 	int nom, den;		/* translyting from pixels->bytes */
@@ -1573,15 +1575,15 @@ static int cirrusfb_set_par_foo (struct 
 
 /* for some reason incomprehensible to me, cirrusfb requires that you write
  * the registers twice for the settings to take..grr. -dte */
-int cirrusfb_set_par (struct fb_info *info)
+static int cirrusfb_set_par (struct fb_info *info)
 {
 	cirrusfb_set_par_foo (info);
 	return cirrusfb_set_par_foo (info);
 }
 
-int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
-			unsigned blue, unsigned transp,
-			struct fb_info *info)
+static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
+			       unsigned blue, unsigned transp,
+			       struct fb_info *info)
 {
 	struct cirrusfb_info *cinfo = info->par;
 
@@ -1632,8 +1634,8 @@ int cirrusfb_setcolreg (unsigned regno, 
 
 	performs display panning - provided hardware permits this
 **************************************************************************/
-int cirrusfb_pan_display (struct fb_var_screeninfo *var,
-			  struct fb_info *info)
+static int cirrusfb_pan_display (struct fb_var_screeninfo *var,
+				 struct fb_info *info)
 {
 	int xoffset = 0;
 	int yoffset = 0;
@@ -1702,7 +1704,7 @@ int cirrusfb_pan_display (struct fb_var_
 }
 
 
-int cirrusfb_blank (int blank_mode, struct fb_info *info)
+static int cirrusfb_blank (int blank_mode, struct fb_info *info)
 {
 	/*
 	 *  Blank the screen if blank_mode != 0, else unblank. If blank == NULL
@@ -2036,7 +2038,7 @@ static void cirrusfb_prim_fillrect(struc
 	return;
 }
 
-void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region)
+static void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region)
 {
 	struct cirrusfb_info *cinfo = info->par;
 	struct fb_fillrect modded;
@@ -2086,7 +2088,7 @@ static void cirrusfb_prim_copyarea(struc
 }
 
 
-void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
+static void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
 {
 	struct cirrusfb_info *cinfo = info->par;
 	struct fb_copyarea modded;
@@ -2121,7 +2123,7 @@ void cirrusfb_copyarea(struct fb_info *i
 	cirrusfb_prim_copyarea(cinfo, &modded);
 }
 
-void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image)
+static void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image)
 {
 	struct cirrusfb_info *cinfo = info->par;
 
@@ -2459,7 +2461,7 @@ err_out:
 	return ret;
 }
 
-void __devexit cirrusfb_pci_unregister (struct pci_dev *pdev)
+static void __devexit cirrusfb_pci_unregister (struct pci_dev *pdev)
 {
 	struct fb_info *info = pci_get_drvdata(pdev);
 	DPRINTK ("ENTER\n");
@@ -2605,7 +2607,7 @@ static struct zorro_driver cirrusfb_zorr
 };
 #endif /* CONFIG_ZORRO */
 
-int __init cirrusfb_init(void)
+static int __init cirrusfb_init(void)
 {
 	int error = 0;
 
@@ -2629,7 +2631,7 @@ int __init cirrusfb_init(void)
 
 
 #ifndef MODULE
-int __init cirrusfb_setup(char *options) {
+static int __init cirrusfb_setup(char *options) {
 	char *this_opt, s[32];
 	int i;
 
@@ -2664,7 +2666,7 @@ MODULE_AUTHOR("Copyright 1999,2000 Jeff 
 MODULE_DESCRIPTION("Accelerated FBDev driver for Cirrus Logic chips");
 MODULE_LICENSE("GPL");
 
-void __exit cirrusfb_exit (void)
+static void __exit cirrusfb_exit (void)
 {
 #ifdef CONFIG_PCI
 	pci_unregister_driver(&cirrusfb_pci_driver);
diff -puN drivers/video/i810/i810_gtf.c~make-various-things-static drivers/video/i810/i810_gtf.c
--- 25/drivers/video/i810/i810_gtf.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/drivers/video/i810/i810_gtf.c	2005-03-06 21:58:45.000000000 -0800
@@ -26,7 +26,7 @@ struct wm_info {
    u32  wm;
 };
 
-struct wm_info i810_wm_8_100[] = {
+static struct wm_info i810_wm_8_100[] = {
 	{ 15, 0x0070c000 },  { 19, 0x0070c000 },  { 25, 0x22003000 },
 	{ 28, 0x22003000 },  { 31, 0x22003000 },  { 36, 0x22007000 },
 	{ 40, 0x22007000 },  { 45, 0x22007000 },  { 49, 0x22008000 },
@@ -40,7 +40,7 @@ struct wm_info i810_wm_8_100[] = {
 	{ 218, 0x2220f000 }, { 229, 0x22210000 }, { 234, 0x22210000 }, 
 };
 
-struct wm_info i810_wm_16_100[] = {
+static struct wm_info i810_wm_16_100[] = {
 	{ 15, 0x0070c000 },  { 19, 0x0020c000 },  { 25, 0x22006000 },
 	{ 28, 0x22006000 },  { 31, 0x22007000 },  { 36, 0x22007000 },
 	{ 40, 0x22007000 },  { 45, 0x22007000 },  { 49, 0x22009000 },
@@ -54,7 +54,7 @@ struct wm_info i810_wm_16_100[] = {
 	{ 218, 0x22416000 }, { 229, 0x22416000 },
 };
 
-struct wm_info i810_wm_24_100[] = {
+static struct wm_info i810_wm_24_100[] = {
 	{ 15, 0x0020c000 },  { 19, 0x0040c000 },  { 25, 0x22009000 },
 	{ 28, 0x22009000 },  { 31, 0x2200a000 },  { 36, 0x2210c000 },
 	{ 40, 0x2210c000 },  { 45, 0x2210c000 },  { 49, 0x22111000 },
@@ -67,7 +67,7 @@ struct wm_info i810_wm_24_100[] = {
 	{ 195, 0x44419000 }, { 202, 0x44419000 }, { 204, 0x44419000 },
 };
 
-struct wm_info i810_wm_8_133[] = {
+static struct wm_info i810_wm_8_133[] = {
 	{ 15, 0x0070c000 },  { 19, 0x0070c000 },  { 25, 0x22003000 },
 	{ 28, 0x22003000 },  { 31, 0x22003000 },  { 36, 0x22007000 },
 	{ 40, 0x22007000 },  { 45, 0x22007000 },  { 49, 0x22008000 },
@@ -81,7 +81,7 @@ struct wm_info i810_wm_8_133[] = {
 	{ 218, 0x2220f000 }, { 229, 0x22210000 }, { 234, 0x22210000 }, 
 };
 
-struct wm_info i810_wm_16_133[] = {
+static struct wm_info i810_wm_16_133[] = {
 	{ 15, 0x0020c000 },  { 19, 0x0020c000 },  { 25, 0x22006000 },
 	{ 28, 0x22006000 },  { 31, 0x22007000 },  { 36, 0x22007000 },
 	{ 40, 0x22007000 },  { 45, 0x22007000 },  { 49, 0x22009000 },
@@ -95,7 +95,7 @@ struct wm_info i810_wm_16_133[] = {
 	{ 218, 0x22416000 }, { 229, 0x22416000 },
 };
 
-struct wm_info i810_wm_24_133[] = {
+static struct wm_info i810_wm_24_133[] = {
 	{ 15, 0x0020c000 },  { 19, 0x00408000 },  { 25, 0x22009000 },
 	{ 28, 0x22009000 },  { 31, 0x2200a000 },  { 36, 0x2210c000 },
 	{ 40, 0x2210c000 },  { 45, 0x2210c000 },  { 49, 0x22111000 },
diff -puN drivers/video/i810/i810_main.c~make-various-things-static drivers/video/i810/i810_main.c
--- 25/drivers/video/i810/i810_main.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/drivers/video/i810/i810_main.c	2005-03-06 21:58:45.000000000 -0800
@@ -635,7 +635,7 @@ static void i810_save_vga_state(struct i
  * DESCRIPTION:
  * Calculates buffer pitch in bytes.  
  */
-u32 get_line_length(struct i810fb_par *par, int xres_virtual, int bpp)
+static u32 get_line_length(struct i810fb_par *par, int xres_virtual, int bpp)
 {
    	u32 length;
 	
@@ -724,7 +724,7 @@ static void i810_calc_dclk(u32 freq, u32
  * Description:
  * Shows or hides the hardware cursor
  */
-void i810_enable_cursor(u8 __iomem *mmio, int mode)
+static void i810_enable_cursor(u8 __iomem *mmio, int mode)
 {
 	u32 temp;
 	
@@ -1805,8 +1805,9 @@ i810_allocate_pci_resource(struct i810fb
 
 	return 0;
 }
-	
-int __init i810fb_setup(char *options)
+
+#ifndef MODULE
+static int __init i810fb_setup(char *options)
 {
 	char *this_opt, *suffix = NULL;
 
@@ -1851,6 +1852,7 @@ int __init i810fb_setup(char *options)
 	}
 	return 0;
 }
+#endif
 
 static int __devinit i810fb_init_pci (struct pci_dev *dev, 
 				   const struct pci_device_id *entry)
@@ -1977,7 +1979,7 @@ static void __exit i810fb_remove_pci(str
 }                                                	
 
 #ifndef MODULE
-int __init i810fb_init(void)
+static int __init i810fb_init(void)
 {
 	char *option = NULL;
 
diff -puN drivers/video/matrox/matroxfb_base.c~make-various-things-static drivers/video/matrox/matroxfb_base.c
--- 25/drivers/video/matrox/matroxfb_base.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/drivers/video/matrox/matroxfb_base.c	2005-03-06 21:58:45.000000000 -0800
@@ -1908,8 +1908,8 @@ fail:;
 	return err;
 }
 
-LIST_HEAD(matroxfb_list);
-LIST_HEAD(matroxfb_driver_list);
+static LIST_HEAD(matroxfb_list);
+static LIST_HEAD(matroxfb_driver_list);
 
 #define matroxfb_l(x) list_entry(x, struct matrox_fb_info, next_fb)
 #define matroxfb_driver_l(x) list_entry(x, struct matroxfb_driver, node)
@@ -2287,7 +2287,7 @@ static void __exit matrox_done(void) {
 
 /* ************************* init in-kernel code ************************** */
 
-int __init matroxfb_setup(char *options) {
+static int __init matroxfb_setup(char *options) {
 	char *this_opt;
 
 	DBG(__FUNCTION__)
@@ -2428,7 +2428,7 @@ int __init matroxfb_setup(char *options)
 
 static int __initdata initialized = 0;
 
-int __init matroxfb_init(void)
+static int __init matroxfb_init(void)
 {
 	char *option = NULL;
 
diff -puN drivers/video/matrox/matroxfb_base.h~make-various-things-static drivers/video/matrox/matroxfb_base.h
--- 25/drivers/video/matrox/matroxfb_base.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/drivers/video/matrox/matroxfb_base.h	2005-03-06 21:58:45.000000000 -0800
@@ -764,7 +764,6 @@ void matroxfb_unregister_driver(struct m
 #define matroxfb_DAC_unlock_irqrestore(flags) spin_unlock_irqrestore(&ACCESS_FBINFO(lock.DAC),flags)
 extern void matroxfb_DAC_out(CPMINFO int reg, int val);
 extern int matroxfb_DAC_in(CPMINFO int reg);
-extern struct list_head matroxfb_list;
 extern void matroxfb_var2my(struct fb_var_screeninfo* fvsi, struct my_timming* mt);
 extern int matroxfb_wait_for_sync(WPMINFO u_int32_t crtc);
 extern int matroxfb_enable_irq(WPMINFO int reenable);
diff -puN drivers/video/sstfb.c~make-various-things-static drivers/video/sstfb.c
--- 25/drivers/video/sstfb.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/drivers/video/sstfb.c	2005-03-06 21:58:45.000000000 -0800
@@ -1338,8 +1338,8 @@ static void  __devexit sst_shutdown(stru
 /*
  * Interface to the world
  */
-
-int  __init sstfb_setup(char *options)
+#ifndef MODULE
+static int  __init sstfb_setup(char *options)
 {
 	char *this_opt;
 
@@ -1372,6 +1372,7 @@ int  __init sstfb_setup(char *options)
 	}
 	return 0;
 }
+#endif
 
 static struct fb_ops sstfb_ops = {
 	.owner		= THIS_MODULE,
@@ -1565,7 +1566,7 @@ static struct pci_driver sstfb_driver = 
 };
 
 
-int __devinit sstfb_init(void)
+static int __devinit sstfb_init(void)
 {
 #ifndef MODULE
 	char *option = NULL;
@@ -1577,10 +1578,12 @@ int __devinit sstfb_init(void)
 	return pci_module_init(&sstfb_driver);
 }
 
-void __devexit sstfb_exit(void)
+#ifdef MODULE
+static void __devexit sstfb_exit(void)
 {
 	pci_unregister_driver(&sstfb_driver);
 }
+#endif
 
 
 /*
diff -puN fs/hpfs/alloc.c~make-various-things-static fs/hpfs/alloc.c
--- 25/fs/hpfs/alloc.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/hpfs/alloc.c	2005-03-06 21:58:45.000000000 -0800
@@ -8,6 +8,8 @@
 
 #include "hpfs_fn.h"
 
+static int hpfs_alloc_if_possible_nolock(struct super_block *s, secno sec);
+
 /*
  * Check if a sector is allocated in bitmap
  * This is really slow. Turned on only if chk==2
@@ -243,7 +245,7 @@ static secno alloc_in_dirband(struct sup
 
 /* Alloc sector if it's free */
 
-int hpfs_alloc_if_possible_nolock(struct super_block *s, secno sec)
+static int hpfs_alloc_if_possible_nolock(struct super_block *s, secno sec)
 {
 	struct quad_buffer_head qbh;
 	unsigned *bmp;
diff -puN fs/hpfs/dentry.c~make-various-things-static fs/hpfs/dentry.c
--- 25/fs/hpfs/dentry.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/hpfs/dentry.c	2005-03-06 21:58:45.000000000 -0800
@@ -12,7 +12,7 @@
  * Note: the dentry argument is the parent dentry.
  */
 
-int hpfs_hash_dentry(struct dentry *dentry, struct qstr *qstr)
+static int hpfs_hash_dentry(struct dentry *dentry, struct qstr *qstr)
 {
 	unsigned long	 hash;
 	int		 i;
@@ -34,7 +34,7 @@ int hpfs_hash_dentry(struct dentry *dent
 	return 0;
 }
 
-int hpfs_compare_dentry(struct dentry *dentry, struct qstr *a, struct qstr *b)
+static int hpfs_compare_dentry(struct dentry *dentry, struct qstr *a, struct qstr *b)
 {
 	unsigned al=a->len;
 	unsigned bl=b->len;
@@ -49,7 +49,7 @@ int hpfs_compare_dentry(struct dentry *d
 	return 0;
 }
 
-struct dentry_operations hpfs_dentry_operations = {
+static struct dentry_operations hpfs_dentry_operations = {
 	.d_hash		= hpfs_hash_dentry,
 	.d_compare	= hpfs_compare_dentry,
 };
diff -puN fs/hpfs/dnode.c~make-various-things-static fs/hpfs/dnode.c
--- 25/fs/hpfs/dnode.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/hpfs/dnode.c	2005-03-06 21:58:45.000000000 -0800
@@ -78,7 +78,7 @@ static void for_all_poss(struct inode *i
 	return;
 }
 
-void hpfs_pos_subst(loff_t *p, loff_t f, loff_t t)
+static void hpfs_pos_subst(loff_t *p, loff_t f, loff_t t)
 {
 	if (*p == f) *p = t;
 }
@@ -88,7 +88,7 @@ void hpfs_pos_subst(loff_t *p, loff_t f,
 	if ((*p & ~0x3f) == (f & ~0x3f)) *p = (t & ~0x3f) | (*p & 0x3f);
 }*/
 
-void hpfs_pos_ins(loff_t *p, loff_t d, loff_t c)
+static void hpfs_pos_ins(loff_t *p, loff_t d, loff_t c)
 {
 	if ((*p & ~0x3f) == (d & ~0x3f) && (*p & 0x3f) >= (d & 0x3f)) {
 		int n = (*p & 0x3f) + c;
@@ -97,7 +97,7 @@ void hpfs_pos_ins(loff_t *p, loff_t d, l
 	}
 }
 
-void hpfs_pos_del(loff_t *p, loff_t d, loff_t c)
+static void hpfs_pos_del(loff_t *p, loff_t d, loff_t c)
 {
 	if ((*p & ~0x3f) == (d & ~0x3f) && (*p & 0x3f) >= (d & 0x3f)) {
 		int n = (*p & 0x3f) - c;
@@ -189,7 +189,8 @@ struct hpfs_dirent *hpfs_add_de(struct s
 
 /* Delete dirent and don't care about its subtree */
 
-void hpfs_delete_de(struct super_block *s, struct dnode *d, struct hpfs_dirent *de)
+static void hpfs_delete_de(struct super_block *s, struct dnode *d,
+			   struct hpfs_dirent *de)
 {
 	if (de->last) {
 		hpfs_error(s, "attempt to delete last dirent in dnode %08x", d->self);
@@ -221,8 +222,9 @@ static void fix_up_ptrs(struct super_blo
 
 /* Add an entry to dnode and do dnode splitting if required */
 
-int hpfs_add_to_dnode(struct inode *i, dnode_secno dno, unsigned char *name, unsigned namelen,
-		      struct hpfs_dirent *new_de, dnode_secno down_ptr)
+static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
+			     unsigned char *name, unsigned namelen,
+			     struct hpfs_dirent *new_de, dnode_secno down_ptr)
 {
 	struct quad_buffer_head qbh, qbh1, qbh2;
 	struct dnode *d, *ad, *rd, *nd = NULL;
diff -puN fs/hpfs/hpfs_fn.h~make-various-things-static fs/hpfs/hpfs_fn.h
--- 25/fs/hpfs/hpfs_fn.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/hpfs/hpfs_fn.h	2005-03-06 21:58:45.000000000 -0800
@@ -202,7 +202,6 @@ static inline unsigned tstbits(unsigned 
 
 int hpfs_chk_sectors(struct super_block *, secno, int, char *);
 secno hpfs_alloc_sector(struct super_block *, secno, unsigned, int, int);
-int hpfs_alloc_if_possible_nolock(struct super_block *, secno);
 int hpfs_alloc_if_possible(struct super_block *, secno);
 void hpfs_free_sectors(struct super_block *, secno, unsigned);
 int hpfs_check_free_dnodes(struct super_block *, int);
@@ -247,8 +246,6 @@ extern struct file_operations hpfs_dir_o
 void hpfs_add_pos(struct inode *, loff_t *);
 void hpfs_del_pos(struct inode *, loff_t *);
 struct hpfs_dirent *hpfs_add_de(struct super_block *, struct dnode *, unsigned char *, unsigned, secno);
-void hpfs_delete_de(struct super_block *, struct dnode *, struct hpfs_dirent *);
-int hpfs_add_to_dnode(struct inode *, dnode_secno, unsigned char *, unsigned, struct hpfs_dirent *, dnode_secno);
 int hpfs_add_dirent(struct inode *, unsigned char *, unsigned, struct hpfs_dirent *, int);
 int hpfs_remove_dirent(struct inode *, dnode_secno, struct hpfs_dirent *, struct quad_buffer_head *, int);
 void hpfs_count_dnodes(struct super_block *, dnode_secno, int *, int *, int *);
@@ -276,7 +273,6 @@ extern struct address_space_operations h
 
 void hpfs_init_inode(struct inode *);
 void hpfs_read_inode(struct inode *);
-void hpfs_write_inode_ea(struct inode *, struct fnode *);
 void hpfs_write_inode(struct inode *);
 void hpfs_write_inode_nolock(struct inode *);
 int hpfs_notify_change(struct dentry *, struct iattr *);
diff -puN fs/hpfs/inode.c~make-various-things-static fs/hpfs/inode.c
--- 25/fs/hpfs/inode.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/hpfs/inode.c	2005-03-06 21:58:45.000000000 -0800
@@ -141,7 +141,7 @@ void hpfs_read_inode(struct inode *i)
 	brelse(bh);
 }
 
-void hpfs_write_inode_ea(struct inode *i, struct fnode *fnode)
+static void hpfs_write_inode_ea(struct inode *i, struct fnode *fnode)
 {
 	struct hpfs_inode_info *hpfs_inode = hpfs_i(i);
 	/*if (fnode->acl_size_l || fnode->acl_size_s) {
diff -puN fs/hpfs/name.c~make-various-things-static fs/hpfs/name.c
--- 25/fs/hpfs/name.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/hpfs/name.c	2005-03-06 21:58:45.000000000 -0800
@@ -8,12 +8,12 @@
 
 #include "hpfs_fn.h"
 
-char *text_postfix[]={
+static char *text_postfix[]={
 ".ASM", ".BAS", ".BAT", ".C", ".CC", ".CFG", ".CMD", ".CON", ".CPP", ".DEF",
 ".DOC", ".DPR", ".ERX", ".H", ".HPP", ".HTM", ".HTML", ".JAVA", ".LOG", ".PAS",
 ".RC", ".TEX", ".TXT", ".Y", ""};
 
-char *text_prefix[]={
+static char *text_prefix[]={
 "AUTOEXEC.", "CHANGES", "COPYING", "CONFIG.", "CREDITS", "FAQ", "FILE_ID.DIZ",
 "MAKEFILE", "READ.ME", "README", "TERMCAP", ""};
 
diff -puN fs/hpfs/super.c~make-various-things-static fs/hpfs/super.c
--- 25/fs/hpfs/super.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/hpfs/super.c	2005-03-06 21:58:45.000000000 -0800
@@ -246,9 +246,9 @@ static match_table_t tokens = {
 	{Opt_err, NULL},
 };
 
-int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
-	       int *lowercase, int *conv, int *eas, int *chk, int *errs,
-	       int *chkdsk, int *timeshift)
+static int parse_opts(char *opts, uid_t *uid, gid_t *gid, umode_t *umask,
+		      int *lowercase, int *conv, int *eas, int *chk, int *errs,
+		      int *chkdsk, int *timeshift)
 {
 	char *p;
 	int option;
diff -puN fs/lockd/clntproc.c~make-various-things-static fs/lockd/clntproc.c
--- 25/fs/lockd/clntproc.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/lockd/clntproc.c	2005-03-06 21:58:45.000000000 -0800
@@ -322,7 +322,7 @@ static int nlm_wait_on_grace(wait_queue_
 /*
  * Generic NLM call
  */
-int
+static int
 nlmclnt_call(struct nlm_rqst *req, u32 proc)
 {
 	struct nlm_host	*host = req->a_host;
@@ -428,7 +428,7 @@ nlmsvc_async_call(struct nlm_rqst *req, 
 	return status;
 }
 
-int
+static int
 nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback)
 {
 	struct nlm_host	*host = req->a_host;
diff -puN fs/ncpfs/ncplib_kernel.c~make-various-things-static fs/ncpfs/ncplib_kernel.c
--- 25/fs/ncpfs/ncplib_kernel.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/ncpfs/ncplib_kernel.c	2005-03-06 21:58:45.000000000 -0800
@@ -933,7 +933,7 @@ int ncp_search_for_fileset(struct ncp_se
 	return 0;
 }
 
-int
+static int
 ncp_RenameNSEntry(struct ncp_server *server,
 		  struct inode *old_dir, char *old_name, __le16 old_type,
 		  struct inode *new_dir, char *new_name)
diff -puN fs/nfs/inode.c~make-various-things-static fs/nfs/inode.c
--- 25/fs/nfs/inode.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/nfs/inode.c	2005-03-06 21:58:45.000000000 -0800
@@ -77,6 +77,8 @@ static inline void __nfs_forget_cached_a
 }
 #endif
 
+static struct rpc_program	nfs_program;
+
 static struct super_operations nfs_sops = { 
 	.alloc_inode	= nfs_alloc_inode,
 	.destroy_inode	= nfs_destroy_inode,
@@ -91,7 +93,7 @@ static struct super_operations nfs_sops 
 /*
  * RPC cruft for NFS
  */
-struct rpc_stat			nfs_rpcstat = {
+static struct rpc_stat		nfs_rpcstat = {
 	.program		= &nfs_program
 };
 static struct rpc_version *	nfs_version[] = {
@@ -108,7 +110,7 @@ static struct rpc_version *	nfs_version[
 #endif
 };
 
-struct rpc_program		nfs_program = {
+static struct rpc_program	nfs_program = {
 	.name			= "nfs",
 	.number			= NFS_PROGRAM,
 	.nrvers			= sizeof(nfs_version) / sizeof(nfs_version[0]),
@@ -858,7 +860,7 @@ nfs_setattr(struct dentry *dentry, struc
  * Wait for the inode to get unlocked.
  * (Used for NFS_INO_LOCKED and NFS_INO_REVALIDATING).
  */
-int
+static int
 nfs_wait_on_inode(struct inode *inode, int flag)
 {
 	struct rpc_clnt	*clnt = NFS_CLIENT(inode);
diff -puN fs/nfs/mount_clnt.c~make-various-things-static fs/nfs/mount_clnt.c
--- 25/fs/nfs/mount_clnt.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/nfs/mount_clnt.c	2005-03-06 21:58:45.000000000 -0800
@@ -31,7 +31,7 @@
 
 static struct rpc_clnt *	mnt_create(char *, struct sockaddr_in *,
 								int, int);
-struct rpc_program		mnt_program;
+static struct rpc_program	mnt_program;
 
 struct mnt_fhstatus {
 	unsigned int		status;
@@ -174,7 +174,7 @@ static struct rpc_version *	mnt_version[
 
 static struct rpc_stat		mnt_stats;
 
-struct rpc_program	mnt_program = {
+static struct rpc_program	mnt_program = {
 	.name		= "mount",
 	.number		= NFS_MNT_PROGRAM,
 	.nrvers		= sizeof(mnt_version)/sizeof(mnt_version[0]),
diff -puN fs/nfs/nfs4proc.c~make-various-things-static fs/nfs/nfs4proc.c
--- 25/fs/nfs/nfs4proc.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/nfs/nfs4proc.c	2005-03-06 21:58:45.000000000 -0800
@@ -57,6 +57,7 @@
 static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
 static int nfs4_async_handle_error(struct rpc_task *, struct nfs_server *);
 static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry);
+static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struct nfs4_exception *exception);
 extern u32 *nfs4_decode_dirent(u32 *p, struct nfs_entry *entry, int plus);
 extern struct rpc_procinfo nfs4_procedures[];
 
@@ -381,7 +382,7 @@ out:
 /*
  * Returns an nfs4_state + an extra reference to the inode
  */
-int _nfs4_open_delegated(struct inode *inode, int flags, struct rpc_cred *cred, struct nfs4_state **res)
+static int _nfs4_open_delegated(struct inode *inode, int flags, struct rpc_cred *cred, struct nfs4_state **res)
 {
 	struct nfs_delegation *delegation;
 	struct nfs_server *server = NFS_SERVER(inode);
@@ -581,7 +582,7 @@ out_err:
 }
 
 
-struct nfs4_state *nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, struct iattr *sattr, struct rpc_cred *cred)
+static struct nfs4_state *nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, struct iattr *sattr, struct rpc_cred *cred)
 {
 	struct nfs4_exception exception = { };
 	struct nfs4_state *res;
@@ -645,7 +646,7 @@ static int _nfs4_do_setattr(struct nfs_s
 	return rpc_call_sync(server->client, &msg, 0);
 }
 
-int nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
+static int nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr,
                 struct nfs_fh *fhandle, struct iattr *sattr,
                 struct nfs4_state *state)
 {
@@ -2069,7 +2070,7 @@ nfs4_async_handle_error(struct rpc_task 
 	return 0;
 }
 
-int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs4_client *clp)
+static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs4_client *clp)
 {
 	DEFINE_WAIT(wait);
 	sigset_t oldset;
diff -puN fs/nfs/nfsroot.c~make-various-things-static fs/nfs/nfsroot.c
--- 25/fs/nfs/nfsroot.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/nfs/nfsroot.c	2005-03-06 21:58:45.000000000 -0800
@@ -351,7 +351,7 @@ static void __init root_nfs_print(void)
 #endif
 
 
-int __init root_nfs_init(void)
+static int __init root_nfs_init(void)
 {
 #ifdef NFSROOT_DEBUG
 	nfs_debug |= NFSDBG_ROOT;
@@ -379,7 +379,7 @@ int __init root_nfs_init(void)
  *  Parse NFS server and directory information passed on the kernel
  *  command line.
  */
-int __init nfs_root_setup(char *line)
+static int __init nfs_root_setup(char *line)
 {
 	ROOT_DEV = Root_NFS;
 	if (line[0] == '/' || line[0] == ',' || (line[0] >= '0' && line[0] <= '9')) {
diff -puN fs/nfs/read.c~make-various-things-static fs/nfs/read.c
--- 25/fs/nfs/read.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/nfs/read.c	2005-03-06 21:58:45.000000000 -0800
@@ -370,7 +370,7 @@ out_bad:
 	return -ENOMEM;
 }
 
-int
+static int
 nfs_pagein_list(struct list_head *head, int rpages)
 {
 	LIST_HEAD(one_request);
diff -puN fs/nfs/write.c~make-various-things-static fs/nfs/write.c
--- 25/fs/nfs/write.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/fs/nfs/write.c	2005-03-06 21:58:45.000000000 -0800
@@ -80,14 +80,31 @@ static void nfs_writeback_done_partial(s
 static void nfs_writeback_done_full(struct nfs_write_data *, int);
 static int nfs_wait_on_write_congestion(struct address_space *, int);
 static int nfs_wait_on_requests(struct inode *, unsigned long, unsigned int);
+static int nfs_flush_inode(struct inode *inode, unsigned long idx_start,
+			   unsigned int npages, int how);
 
 static kmem_cache_t *nfs_wdata_cachep;
 mempool_t *nfs_wdata_mempool;
-mempool_t *nfs_commit_mempool;
+static mempool_t *nfs_commit_mempool;
 
 static DECLARE_WAIT_QUEUE_HEAD(nfs_write_congestion);
 
-void nfs_writedata_release(struct rpc_task *task)
+static inline struct nfs_write_data *nfs_commit_alloc(void)
+{
+	struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS);
+	if (p) {
+		memset(p, 0, sizeof(*p));
+		INIT_LIST_HEAD(&p->pages);
+	}
+	return p;
+}
+
+static inline void nfs_commit_free(struct nfs_write_data *p)
+{
+	mempool_free(p, nfs_commit_mempool);
+}
+
+static void nfs_writedata_release(struct rpc_task *task)
 {
 	struct nfs_write_data	*wdata = (struct nfs_write_data *)task->tk_calldata;
 	nfs_writedata_free(wdata);
@@ -990,7 +1007,7 @@ static int nfs_flush_one(struct list_hea
 	return -ENOMEM;
 }
 
-int
+static int
 nfs_flush_list(struct list_head *head, int wpages, int how)
 {
 	LIST_HEAD(one_request);
@@ -1240,7 +1257,7 @@ static void nfs_commit_rpcsetup(struct l
 /*
  * Commit dirty pages
  */
-int
+static int
 nfs_commit_list(struct list_head *head, int how)
 {
 	struct nfs_write_data	*data;
@@ -1314,8 +1331,8 @@ nfs_commit_done(struct rpc_task *task)
 }
 #endif
 
-int nfs_flush_inode(struct inode *inode, unsigned long idx_start,
-		   unsigned int npages, int how)
+static int nfs_flush_inode(struct inode *inode, unsigned long idx_start,
+			   unsigned int npages, int how)
 {
 	struct nfs_inode *nfsi = NFS_I(inode);
 	LIST_HEAD(head);
diff -puN include/asm-i386/cpu.h~make-various-things-static include/asm-i386/cpu.h
--- 25/include/asm-i386/cpu.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/asm-i386/cpu.h	2005-03-06 21:58:45.000000000 -0800
@@ -12,7 +12,6 @@
 struct i386_cpu {
 	struct cpu cpu;
 };
-extern struct i386_cpu cpu_devices[NR_CPUS];
 extern int arch_register_cpu(int num);
 #ifdef CONFIG_HOTPLUG_CPU
 extern void arch_unregister_cpu(int);
diff -puN include/asm-i386/hpet.h~make-various-things-static include/asm-i386/hpet.h
--- 25/include/asm-i386/hpet.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/asm-i386/hpet.h	2005-03-06 21:58:45.000000000 -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);
diff -puN include/asm-i386/mpspec.h~make-various-things-static include/asm-i386/mpspec.h
--- 25/include/asm-i386/mpspec.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/asm-i386/mpspec.h	2005-03-06 21:58:45.000000000 -0800
@@ -22,7 +22,6 @@ extern int mp_irq_entries;
 extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
 extern int mpc_default_type;
 extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
-extern int mp_current_pci_id;
 extern unsigned long mp_lapic_addr;
 extern int pic_mode;
 extern int using_apic_timer;
diff -puN include/asm-i386/semaphore.h~make-various-things-static include/asm-i386/semaphore.h
--- 25/include/asm-i386/semaphore.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/asm-i386/semaphore.h	2005-03-06 21:58:45.000000000 -0800
@@ -92,11 +92,6 @@ fastcall int  __down_failed_interruptibl
 fastcall int  __down_failed_trylock(void  /* params in registers */);
 fastcall void __up_wakeup(void /* special register calling convention */);
 
-fastcall void __down(struct semaphore * sem);
-fastcall int  __down_interruptible(struct semaphore * sem);
-fastcall int  __down_trylock(struct semaphore * sem);
-fastcall void __up(struct semaphore * sem);
-
 /*
  * This is ugly, but we want the default case to fall through.
  * "__down_failed" is a special asm handler that calls the C
diff -puN include/asm-x86_64/mpspec.h~make-various-things-static include/asm-x86_64/mpspec.h
--- 25/include/asm-x86_64/mpspec.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/asm-x86_64/mpspec.h	2005-03-06 21:58:45.000000000 -0800
@@ -176,7 +176,6 @@ extern int apic_version [MAX_APICS];
 extern int mp_irq_entries;
 extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
 extern int mpc_default_type;
-extern int mp_current_pci_id;
 extern unsigned long mp_lapic_addr;
 extern int pic_mode;
 
diff -puN include/linux/audit.h~make-various-things-static include/linux/audit.h
--- 25/include/linux/audit.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/audit.h	2005-03-06 21:58:45.000000000 -0800
@@ -178,16 +178,10 @@ extern void		    audit_log_format(struct
 					     const char *fmt, ...)
 			    __attribute__((format(printf,2,3)));
 extern void		    audit_log_end(struct audit_buffer *ab);
-extern void		    audit_log_end_fast(struct audit_buffer *ab);
-extern void		    audit_log_end_irq(struct audit_buffer *ab);
 extern void		    audit_log_d_path(struct audit_buffer *ab,
 					     const char *prefix,
 					     struct dentry *dentry,
 					     struct vfsmount *vfsmnt);
-extern int		    audit_set_rate_limit(int limit);
-extern int		    audit_set_backlog_limit(int limit);
-extern int		    audit_set_enabled(int state);
-extern int		    audit_set_failure(int state);
 
 				/* Private API (for auditsc.c only) */
 extern void		    audit_send_reply(int pid, int seq, int type,
@@ -200,13 +194,7 @@ extern void		    audit_log_lost(const ch
 #define audit_log_vformat(b,f,a) do { ; } while (0)
 #define audit_log_format(b,f,...) do { ; } while (0)
 #define audit_log_end(b) do { ; } while (0)
-#define audit_log_end_fast(b) do { ; } while (0)
-#define audit_log_end_irq(b) do { ; } while (0)
 #define audit_log_d_path(b,p,d,v) do { ; } while (0)
-#define audit_set_rate_limit(l) do { ; } while (0)
-#define audit_set_backlog_limit(l) do { ; } while (0)
-#define audit_set_enabled(s) do { ; } while (0)
-#define audit_set_failure(s) do { ; } while (0)
 #endif
 #endif
 #endif
diff -puN include/linux/capability.h~make-various-things-static include/linux/capability.h
--- 25/include/linux/capability.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/capability.h	2005-03-06 21:58:45.000000000 -0800
@@ -44,8 +44,6 @@ typedef struct __user_cap_data_struct {
 
 #include <linux/spinlock.h>
 
-extern spinlock_t task_capability_lock;
-
 /* #define STRICT_CAP_T_TYPECHECKS */
 
 #ifdef STRICT_CAP_T_TYPECHECKS
diff -puN include/linux/efi.h~make-various-things-static include/linux/efi.h
--- 25/include/linux/efi.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/efi.h	2005-03-06 21:58:45.000000000 -0800
@@ -301,7 +301,6 @@ extern u64 efi_mem_attributes (unsigned 
 extern int __init efi_uart_console_only (void);
 extern void efi_initialize_iomem_resources(struct resource *code_resource,
 					struct resource *data_resource);
-extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);
 extern unsigned long __init efi_get_time(void);
 extern int __init efi_set_rtc_mmss(unsigned long nowtime);
 extern struct efi_memory_map memmap;
diff -puN include/linux/lockd/lockd.h~make-various-things-static include/linux/lockd/lockd.h
--- 25/include/linux/lockd/lockd.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/lockd/lockd.h	2005-03-06 21:58:45.000000000 -0800
@@ -143,8 +143,6 @@ extern unsigned long		nlmsvc_timeout;
  * Lockd client functions
  */
 struct nlm_rqst * nlmclnt_alloc_call(void);
-int		  nlmclnt_call(struct nlm_rqst *, u32);
-int		  nlmclnt_async_call(struct nlm_rqst *, u32, rpc_action);
 int		  nlmclnt_block(struct nlm_host *, struct file_lock *, u32 *);
 int		  nlmclnt_cancel(struct nlm_host *, struct file_lock *);
 u32		  nlmclnt_grant(struct nlm_lock *);
diff -puN include/linux/module.h~make-various-things-static include/linux/module.h
--- 25/include/linux/module.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/module.h	2005-03-06 21:58:45.000000000 -0800
@@ -563,7 +563,6 @@ __MODULE_PARM_TYPE(var, type);
 extern void __deprecated inter_module_register(const char *,
 		struct module *, const void *);
 extern void __deprecated inter_module_unregister(const char *);
-extern const void * __deprecated inter_module_get(const char *);
 extern const void * __deprecated inter_module_get_request(const char *,
 		const char *);
 extern void __deprecated inter_module_put(const char *);
diff -puN include/linux/nfs_fs.h~make-various-things-static include/linux/nfs_fs.h
--- 25/include/linux/nfs_fs.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/nfs_fs.h	2005-03-06 21:58:45.000000000 -0800
@@ -405,11 +405,8 @@ extern void nfs_commit_done(struct rpc_t
  * return value!)
  */
 extern int  nfs_sync_inode(struct inode *, unsigned long, unsigned int, int);
-extern int  nfs_flush_inode(struct inode *, unsigned long, unsigned int, int);
-extern int  nfs_flush_list(struct list_head *, int, int);
 #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
 extern int  nfs_commit_inode(struct inode *, unsigned long, unsigned int, int);
-extern int  nfs_commit_list(struct list_head *, int);
 #else
 static inline int
 nfs_commit_inode(struct inode *inode, unsigned long idx_start, unsigned int npages, int how)
@@ -450,7 +447,6 @@ static inline int nfs_wb_page(struct ino
  * Allocate and free nfs_write_data structures
  */
 extern mempool_t *nfs_wdata_mempool;
-extern mempool_t *nfs_commit_mempool;
 
 static inline struct nfs_write_data *nfs_writedata_alloc(void)
 {
@@ -467,23 +463,6 @@ static inline void nfs_writedata_free(st
 	mempool_free(p, nfs_wdata_mempool);
 }
 
-extern void  nfs_writedata_release(struct rpc_task *task);
-
-static inline struct nfs_write_data *nfs_commit_alloc(void)
-{
-	struct nfs_write_data *p = mempool_alloc(nfs_commit_mempool, SLAB_NOFS);
-	if (p) {
-		memset(p, 0, sizeof(*p));
-		INIT_LIST_HEAD(&p->pages);
-	}
-	return p;
-}
-
-static inline void nfs_commit_free(struct nfs_write_data *p)
-{
-	mempool_free(p, nfs_commit_mempool);
-}
-
 /* Hack for future NFS swap support */
 #ifndef IS_SWAPFILE
 # define IS_SWAPFILE(inode)	(0)
@@ -495,7 +474,6 @@ static inline void nfs_commit_free(struc
 extern int  nfs_readpage(struct file *, struct page *);
 extern int  nfs_readpages(struct file *, struct address_space *,
 		struct list_head *, unsigned);
-extern int  nfs_pagein_list(struct list_head *, int);
 extern void nfs_readpage_result(struct rpc_task *);
 
 /*
@@ -732,10 +710,8 @@ extern int nfs4_open_reclaim(struct nfs4
 extern int nfs4_proc_async_renew(struct nfs4_client *);
 extern int nfs4_proc_renew(struct nfs4_client *);
 extern int nfs4_do_close(struct inode *inode, struct nfs4_state *state, mode_t mode);
-extern int nfs4_wait_clnt_recover(struct rpc_clnt *, struct nfs4_client *);
 extern struct inode *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *);
 extern int nfs4_open_revalidate(struct inode *, struct dentry *, int);
-extern int nfs4_handle_exception(struct nfs_server *, int, struct nfs4_exception *);
 extern int nfs4_lock_reclaim(struct nfs4_state *state, struct file_lock *request);
 
 /* nfs4renewd.c */
diff -puN include/linux/nfs_xdr.h~make-various-things-static include/linux/nfs_xdr.h
--- 25/include/linux/nfs_xdr.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/nfs_xdr.h	2005-03-06 21:58:45.000000000 -0800
@@ -761,8 +761,6 @@ extern struct nfs_rpc_ops	nfs_v4_cliento
 extern struct rpc_version	nfs_version2;
 extern struct rpc_version	nfs_version3;
 extern struct rpc_version	nfs_version4;
-extern struct rpc_program	nfs_program;
-extern struct rpc_stat		nfs_rpcstat;
 
 extern struct rpc_version	nfsacl_version3;
 extern struct rpc_program	nfsacl_program;
diff -puN include/linux/slab.h~make-various-things-static include/linux/slab.h
--- 25/include/linux/slab.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/slab.h	2005-03-06 21:58:45.000000000 -0800
@@ -114,7 +114,6 @@ extern int FASTCALL(kmem_ptr_validate(km
 
 /* System wide caches */
 extern kmem_cache_t	*vm_area_cachep;
-extern kmem_cache_t	*mm_cachep;
 extern kmem_cache_t	*names_cachep;
 extern kmem_cache_t	*files_cachep;
 extern kmem_cache_t	*filp_cachep;
diff -puN include/linux/timex.h~make-various-things-static include/linux/timex.h
--- 25/include/linux/timex.h~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/include/linux/timex.h	2005-03-06 21:58:45.000000000 -0800
@@ -240,9 +240,7 @@ extern long time_precision;	/* clock pre
 extern long time_maxerror;	/* maximum error */
 extern long time_esterror;	/* estimated error */
 
-extern long time_phase;		/* phase offset (scaled us) */
 extern long time_freq;		/* frequency offset (scaled ppm) */
-extern long time_adj;		/* tick adjust (scaled 1 / HZ) */
 extern long time_reftime;	/* time at last adjustment (s) */
 
 extern long time_adjust;	/* The amount of adjtime left */
diff -puN kernel/acct.c~make-various-things-static kernel/acct.c
--- 25/kernel/acct.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/acct.c	2005-03-06 21:58:45.000000000 -0800
@@ -170,7 +170,7 @@ out:
  *
  * NOTE: acct_globals.lock MUST be held on entry and exit.
  */
-void acct_file_reopen(struct file *file)
+static void acct_file_reopen(struct file *file)
 {
 	struct file *old_acct = NULL;
 
diff -puN kernel/audit.c~make-various-things-static kernel/audit.c
--- 25/kernel/audit.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/audit.c	2005-03-06 21:58:45.000000000 -0800
@@ -155,6 +155,9 @@ struct audit_entry {
 	struct audit_rule rule;
 };
 
+static void audit_log_end_irq(struct audit_buffer *ab);
+static void audit_log_end_fast(struct audit_buffer *ab);
+
 static void audit_panic(const char *message)
 {
 	switch (audit_failure)
@@ -236,7 +239,7 @@ void audit_log_lost(const char *message)
 
 }
 
-int audit_set_rate_limit(int limit)
+static int audit_set_rate_limit(int limit)
 {
 	int old		 = audit_rate_limit;
 	audit_rate_limit = limit;
@@ -245,7 +248,7 @@ int audit_set_rate_limit(int limit)
 	return old;
 }
 
-int audit_set_backlog_limit(int limit)
+static int audit_set_backlog_limit(int limit)
 {
 	int old		 = audit_backlog_limit;
 	audit_backlog_limit = limit;
@@ -254,7 +257,7 @@ int audit_set_backlog_limit(int limit)
 	return old;
 }
 
-int audit_set_enabled(int state)
+static int audit_set_enabled(int state)
 {
 	int old		 = audit_enabled;
 	if (state != 0 && state != 1)
@@ -265,7 +268,7 @@ int audit_set_enabled(int state)
 	return old;
 }
 
-int audit_set_failure(int state)
+static int audit_set_failure(int state)
 {
 	int old		 = audit_failure;
 	if (state != AUDIT_FAIL_SILENT
@@ -547,7 +550,7 @@ static inline int audit_log_drain(struct
 }
 
 /* Initialize audit support at boot time. */
-int __init audit_init(void)
+static int __init audit_init(void)
 {
 	printk(KERN_INFO "audit: initializing netlink socket (%s)\n",
 	       audit_default ? "enabled" : "disabled");
@@ -768,7 +771,7 @@ static DECLARE_TASKLET(audit_tasklet, au
  * the audit buffer is places on a queue and a tasklet is scheduled to
  * remove them from the queue outside the irq context.  May be called in
  * any context. */
-void audit_log_end_irq(struct audit_buffer *ab)
+static void audit_log_end_irq(struct audit_buffer *ab)
 {
 	unsigned long flags;
 
@@ -783,7 +786,7 @@ void audit_log_end_irq(struct audit_buff
 
 /* Send the message in the audit buffer directly to user space.  May not
  * be called in an irq context. */
-void audit_log_end_fast(struct audit_buffer *ab)
+static void audit_log_end_fast(struct audit_buffer *ab)
 {
 	unsigned long flags;
 
diff -puN kernel/capability.c~make-various-things-static kernel/capability.c
--- 25/kernel/capability.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/capability.c	2005-03-06 21:58:45.000000000 -0800
@@ -20,10 +20,10 @@ EXPORT_SYMBOL(securebits);
 EXPORT_SYMBOL(cap_bset);
 
 /*
- * This global lock protects task->cap_* for all tasks including current.
+ * This lock protects task->cap_* for all tasks including current.
  * Locking rule: acquire this prior to tasklist_lock.
  */
-DEFINE_SPINLOCK(task_capability_lock);
+static DEFINE_SPINLOCK(task_capability_lock);
 
 /*
  * For sys_getproccap() and sys_setproccap(), any of the three
diff -puN kernel/fork.c~make-various-things-static kernel/fork.c
--- 25/kernel/fork.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/fork.c	2005-03-06 21:58:45.000000000 -0800
@@ -80,6 +80,24 @@ int nr_processes(void)
 static kmem_cache_t *task_struct_cachep;
 #endif
 
+/* SLAB cache for signal_struct structures (tsk->signal) */
+kmem_cache_t *signal_cachep;
+
+/* SLAB cache for sighand_struct structures (tsk->sighand) */
+kmem_cache_t *sighand_cachep;
+
+/* SLAB cache for files_struct structures (tsk->files) */
+kmem_cache_t *files_cachep;
+
+/* SLAB cache for fs_struct structures (tsk->fs) */
+kmem_cache_t *fs_cachep;
+
+/* SLAB cache for vm_area_struct structures */
+kmem_cache_t *vm_area_cachep;
+
+/* SLAB cache for mm_struct structures (tsk->mm) */
+static kmem_cache_t *mm_cachep;
+
 void free_task(struct task_struct *tsk)
 {
 	free_thread_info(tsk->thread_info);
@@ -1237,24 +1255,6 @@ long do_fork(unsigned long clone_flags,
 	return pid;
 }
 
-/* SLAB cache for signal_struct structures (tsk->signal) */
-kmem_cache_t *signal_cachep;
-
-/* SLAB cache for sighand_struct structures (tsk->sighand) */
-kmem_cache_t *sighand_cachep;
-
-/* SLAB cache for files_struct structures (tsk->files) */
-kmem_cache_t *files_cachep;
-
-/* SLAB cache for fs_struct structures (tsk->fs) */
-kmem_cache_t *fs_cachep;
-
-/* SLAB cache for vm_area_struct structures */
-kmem_cache_t *vm_area_cachep;
-
-/* SLAB cache for mm_struct structures (tsk->mm) */
-kmem_cache_t *mm_cachep;
-
 void __init proc_caches_init(void)
 {
 	sighand_cachep = kmem_cache_create("sighand_cache",
diff -puN kernel/intermodule.c~make-various-things-static kernel/intermodule.c
--- 25/kernel/intermodule.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/intermodule.c	2005-03-06 21:58:45.000000000 -0800
@@ -113,7 +113,7 @@ void inter_module_unregister(const char 
  * Try to increment the use count on the owning module, if that fails
  * then return NULL.  Otherwise return the userdata.
  */
-const void *inter_module_get(const char *im_name)
+static const void *inter_module_get(const char *im_name)
 {
 	struct list_head *tmp;
 	struct inter_module_entry *ime;
@@ -178,6 +178,5 @@ void inter_module_put(const char *im_nam
 
 EXPORT_SYMBOL(inter_module_register);
 EXPORT_SYMBOL(inter_module_unregister);
-EXPORT_SYMBOL(inter_module_get);
 EXPORT_SYMBOL(inter_module_get_request);
 EXPORT_SYMBOL(inter_module_put);
diff -puN kernel/power/main.c~make-various-things-static kernel/power/main.c
--- 25/kernel/power/main.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/power/main.c	2005-03-06 21:58:45.000000000 -0800
@@ -115,7 +115,7 @@ static void suspend_finish(suspend_state
 
 
 
-char * pm_states[] = {
+static char * pm_states[] = {
 	[PM_SUSPEND_STANDBY]	= "standby",
 	[PM_SUSPEND_MEM]	= "mem",
 	[PM_SUSPEND_DISK]	= "disk",
diff -puN kernel/resource.c~make-various-things-static kernel/resource.c
--- 25/kernel/resource.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/resource.c	2005-03-06 21:58:45.000000000 -0800
@@ -91,7 +91,7 @@ static int r_show(struct seq_file *m, vo
 	return 0;
 }
 
-struct seq_operations resource_op = {
+static struct seq_operations resource_op = {
 	.start	= r_start,
 	.next	= r_next,
 	.stop	= r_stop,
diff -puN kernel/signal.c~make-various-things-static kernel/signal.c
--- 25/kernel/signal.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/signal.c	2005-03-06 21:58:45.000000000 -0800
@@ -28,8 +28,6 @@
 #include <asm/unistd.h>
 #include <asm/siginfo.h>
 
-extern void k_getrusage(struct task_struct *, int, struct rusage *);
-
 /*
  * SLAB caches for signal bits.
  */
diff -puN kernel/sys.c~make-various-things-static kernel/sys.c
--- 25/kernel/sys.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/sys.c	2005-03-06 21:58:45.000000000 -0800
@@ -92,7 +92,7 @@ int cad_pid = 1;
  */
 
 static struct notifier_block *reboot_notifier_list;
-DEFINE_RWLOCK(notifier_lock);
+static DEFINE_RWLOCK(notifier_lock);
 
 /**
  *	notifier_chain_register	- Add notifier to a notifier chain
@@ -1560,7 +1560,7 @@ asmlinkage long sys_setrlimit(unsigned i
  * given child after it's reaped, or none so this sample is before reaping.
  */
 
-void k_getrusage(struct task_struct *p, int who, struct rusage *r)
+static void k_getrusage(struct task_struct *p, int who, struct rusage *r)
 {
 	struct task_struct *t;
 	unsigned long flags;
diff -puN kernel/timer.c~make-various-things-static kernel/timer.c
--- 25/kernel/timer.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/kernel/timer.c	2005-03-06 21:58:45.000000000 -0800
@@ -590,10 +590,10 @@ long time_tolerance = MAXFREQ;		/* frequ
 long time_precision = 1;		/* clock precision (us)		*/
 long time_maxerror = NTP_PHASE_LIMIT;	/* maximum error (us)		*/
 long time_esterror = NTP_PHASE_LIMIT;	/* estimated error (us)		*/
-long time_phase;			/* phase offset (scaled us)	*/
+static long time_phase;			/* phase offset (scaled us)	*/
 long time_freq = (((NSEC_PER_SEC + HZ/2) % HZ - HZ/2) << SHIFT_USEC) / NSEC_PER_USEC;
 					/* frequency offset (scaled ppm)*/
-long time_adj;				/* tick adjust (scaled 1 / HZ)	*/
+static long time_adj;			/* tick adjust (scaled 1 / HZ)	*/
 long time_reftime;			/* time at last adjustment (s)	*/
 long time_adjust;
 long time_next_adjust;
diff -puN lib/kernel_lock.c~make-various-things-static lib/kernel_lock.c
--- 25/lib/kernel_lock.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/lib/kernel_lock.c	2005-03-06 21:58:45.000000000 -0800
@@ -79,7 +79,7 @@ EXPORT_SYMBOL(smp_processor_id);
  *
  * Don't use in new code.
  */
-DECLARE_MUTEX(kernel_sem);
+static DECLARE_MUTEX(kernel_sem);
 
 /*
  * Re-acquire the kernel semaphore.
diff -puN mm/shmem.c~make-various-things-static mm/shmem.c
--- 25/mm/shmem.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/mm/shmem.c	2005-03-06 21:58:45.000000000 -0800
@@ -2172,7 +2172,7 @@ static int shmem_xattr_security_set(stru
 	return security_inode_setsecurity(inode, name, value, size, flags);
 }
 
-struct xattr_handler shmem_xattr_security_handler = {
+static struct xattr_handler shmem_xattr_security_handler = {
 	.prefix	= XATTR_SECURITY_PREFIX,
 	.list	= shmem_xattr_security_list,
 	.get	= shmem_xattr_security_get,
diff -puN mm/thrash.c~make-various-things-static mm/thrash.c
--- 25/mm/thrash.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/mm/thrash.c	2005-03-06 21:58:45.000000000 -0800
@@ -15,7 +15,7 @@
 
 static DEFINE_SPINLOCK(swap_token_lock);
 static unsigned long swap_token_timeout;
-unsigned long swap_token_check;
+static unsigned long swap_token_check;
 struct mm_struct * swap_token_mm = &init_mm;
 
 #define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2)
diff -puN security/seclvl.c~make-various-things-static security/seclvl.c
--- 25/security/seclvl.c~make-various-things-static	2005-03-06 21:58:45.000000000 -0800
+++ 25-akpm/security/seclvl.c	2005-03-06 21:58:45.000000000 -0800
@@ -170,7 +170,7 @@ seclvl_attr_show(struct kobject *kobj, s
 /**
  * Callback function pointers for show and store
  */
-struct sysfs_ops seclvlfs_sysfs_ops = {
+static struct sysfs_ops seclvlfs_sysfs_ops = {
 	.show = seclvl_attr_show,
 	.store = seclvl_attr_store,
 };
@@ -275,7 +275,7 @@ seclvl_write_file(struct seclvl_obj *obj
 }
 
 /* Generate sysfs_attr_seclvl */
-struct seclvl_attribute sysfs_attr_seclvl =
+static struct seclvl_attribute sysfs_attr_seclvl =
 __ATTR(seclvl, (S_IFREG | S_IRUGO | S_IWUSR), seclvl_read_file,
        seclvl_write_file);
 
@@ -386,7 +386,7 @@ seclvl_write_passwd(struct seclvl_obj *o
 }
 
 /* Generate sysfs_attr_passwd */
-struct seclvl_attribute sysfs_attr_passwd =
+static struct seclvl_attribute sysfs_attr_passwd =
 __ATTR(passwd, (S_IFREG | S_IRUGO | S_IWUSR), seclvl_read_passwd,
        seclvl_write_passwd);
 
_
