summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-03-11 16:40:56 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-11 16:40:56 -0800
commit9d340cb7c38e0872b742890d76190cc3ac3cfd50 (patch)
treedfdeec48c5c8bbee1fc210402fb268d78d9d59ec
parentaf942602d0cc67254c861ed1c9a4171ccd6e0e32 (diff)
[PATCH] Make lots of things static
This is a megarollup of ~60 patches which give various things static scope. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--Documentation/pm.txt17
-rw-r--r--arch/i386/kernel/apic.c4
-rw-r--r--arch/i386/kernel/cpu/cyrix.c2
-rw-r--r--arch/i386/kernel/cpuid.c4
-rw-r--r--arch/i386/kernel/efi.c8
-rw-r--r--arch/i386/kernel/i8259.c4
-rw-r--r--arch/i386/kernel/io_apic.c4
-rw-r--r--arch/i386/kernel/mpparse.c6
-rw-r--r--arch/i386/kernel/msr.c4
-rw-r--r--arch/i386/kernel/process.c2
-rw-r--r--arch/i386/kernel/quirks.c2
-rw-r--r--arch/i386/kernel/semaphore.c8
-rw-r--r--arch/i386/kernel/setup.c8
-rw-r--r--arch/i386/kernel/time.c2
-rw-r--r--arch/i386/kernel/time_hpet.c10
-rw-r--r--arch/i386/kernel/timers/timer_hpet.c2
-rw-r--r--arch/i386/kernel/traps.c2
-rw-r--r--arch/i386/mach-default/topology.c2
-rw-r--r--arch/i386/mach-visws/mpparse.c2
-rw-r--r--arch/x86_64/kernel/apic.c4
-rw-r--r--arch/x86_64/kernel/i8259.c4
-rw-r--r--arch/x86_64/kernel/mpparse.c4
-rw-r--r--arch/x86_64/kernel/msr.c4
-rw-r--r--arch/x86_64/kernel/process.c2
-rw-r--r--arch/x86_64/kernel/time.c2
-rw-r--r--drivers/block/cfq-iosched.c2
-rw-r--r--drivers/block/deadline-iosched.c2
-rw-r--r--drivers/block/elevator.c4
-rw-r--r--drivers/block/floppy.c4
-rw-r--r--drivers/block/loop.c4
-rw-r--r--drivers/block/nbd.c6
-rw-r--r--drivers/block/rd.c2
-rw-r--r--drivers/block/umem.c4
-rw-r--r--drivers/block/xd.c2
-rw-r--r--drivers/char/isicom.c2
-rw-r--r--drivers/char/synclinkmp.c6
-rw-r--r--drivers/char/watchdog/machzwd.c2
-rw-r--r--drivers/char/watchdog/sc1200wdt.c6
-rw-r--r--drivers/scsi/53c700.c4
-rw-r--r--drivers/scsi/53c700.h1
-rw-r--r--drivers/scsi/dpt_i2o.c2
-rw-r--r--drivers/scsi/ips.c244
-rw-r--r--drivers/scsi/ips.h12
-rw-r--r--drivers/scsi/psi240i.c8
-rw-r--r--drivers/scsi/psi240i.h4
-rw-r--r--drivers/scsi/sr.c2
-rw-r--r--drivers/scsi/sym53c416.c2
-rw-r--r--drivers/scsi/ultrastor.c2
-rw-r--r--drivers/video/asiliantfb.c9
-rw-r--r--drivers/video/cirrusfb.c72
-rw-r--r--drivers/video/i810/i810_gtf.c12
-rw-r--r--drivers/video/i810/i810_main.c12
-rw-r--r--drivers/video/matrox/matroxfb_base.c8
-rw-r--r--drivers/video/matrox/matroxfb_base.h1
-rw-r--r--drivers/video/sstfb.c11
-rw-r--r--fs/hpfs/alloc.c4
-rw-r--r--fs/hpfs/dentry.c6
-rw-r--r--fs/hpfs/dnode.c14
-rw-r--r--fs/hpfs/hpfs_fn.h4
-rw-r--r--fs/hpfs/inode.c2
-rw-r--r--fs/hpfs/name.c4
-rw-r--r--fs/hpfs/super.c6
-rw-r--r--fs/ncpfs/ncplib_kernel.c2
-rw-r--r--fs/qnx4/bitmap.c4
-rw-r--r--fs/qnx4/inode.c8
-rw-r--r--include/asm-i386/cpu.h1
-rw-r--r--include/asm-i386/hpet.h2
-rw-r--r--include/asm-i386/mpspec.h1
-rw-r--r--include/asm-i386/semaphore.h5
-rw-r--r--include/asm-x86_64/mpspec.h1
-rw-r--r--include/linux/audit.h12
-rw-r--r--include/linux/capability.h2
-rw-r--r--include/linux/efi.h1
-rw-r--r--include/linux/module.h1
-rw-r--r--include/linux/pm.h10
-rw-r--r--include/linux/qnx4_fs.h2
-rw-r--r--include/linux/slab.h1
-rw-r--r--include/linux/timex.h2
-rw-r--r--kernel/acct.c2
-rw-r--r--kernel/audit.c17
-rw-r--r--kernel/capability.c4
-rw-r--r--kernel/fork.c36
-rw-r--r--kernel/intermodule.c3
-rw-r--r--kernel/power/main.c2
-rw-r--r--kernel/power/pm.c2
-rw-r--r--kernel/power/smp.c2
-rw-r--r--kernel/resource.c2
-rw-r--r--kernel/signal.c2
-rw-r--r--kernel/sys.c4
-rw-r--r--kernel/timer.c4
-rw-r--r--lib/kernel_lock.c2
-rw-r--r--mm/shmem.c2
-rw-r--r--mm/thrash.c2
-rw-r--r--security/seclvl.c6
94 files changed, 341 insertions, 411 deletions
diff --git a/Documentation/pm.txt b/Documentation/pm.txt
index 6b9aecc4cd5f..cc63ae18d147 100644
--- a/Documentation/pm.txt
+++ b/Documentation/pm.txt
@@ -222,23 +222,6 @@ communicate with drivers through the existing generic power
management interface.
/*
- * Send a request to a single device
- *
- * Parameters:
- * dev - PM device previously returned from pm_register or pm_find
- * rqst - request type
- * data - data, if any, associated with the request
- *
- * Returns: 0 if the request is successful
- * See "pm_callback" return for errors
- *
- * Details: Forward request to device callback and, if a suspend
- * or resume request, update the pm_dev "state" field
- * appropriately
- */
-int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data);
-
-/*
* Send a request to all devices
*
* Parameters:
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 7f98d17a41ba..58fd2a6962ef 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -909,7 +909,7 @@ void (*wait_timer_tick)(void) __initdata = wait_8254_wraparound;
#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;
@@ -959,7 +959,7 @@ static void __init setup_APIC_timer(unsigned int clocks)
* 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 --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c
index 98b85b60477b..ba4b01138c8f 100644
--- a/arch/i386/kernel/cpu/cyrix.c
+++ b/arch/i386/kernel/cpu/cyrix.c
@@ -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 --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c
index 32a0984318f6..2e2756345bb2 100644
--- a/arch/i386/kernel/cpuid.c
+++ b/arch/i386/kernel/cpuid.c
@@ -189,7 +189,7 @@ static struct notifier_block cpuid_class_cpu_notifier =
.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 --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index 8c3623b85b08..9e5e0d8bd36e 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -46,7 +46,7 @@ extern efi_status_t asmlinkage efi_call_phys(void *, ...);
struct efi efi;
EXPORT_SYMBOL(efi);
-struct efi efi_phys __initdata;
+static struct efi efi_phys __initdata;
struct efi_memory_map memmap __initdata;
/*
@@ -151,7 +151,7 @@ phys_efi_set_virtual_address_map(unsigned long memory_map_size,
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;
@@ -240,7 +240,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;
@@ -254,6 +255,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 --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
index 8db14852f33f..560bef1afb3b 100644
--- a/arch/i386/kernel/i8259.c
+++ b/arch/i386/kernel/i8259.c
@@ -49,7 +49,7 @@ static void end_8259A_irq (unsigned int irq)
#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)
{
@@ -168,7 +168,7 @@ static inline int i8259A_irq_real(unsigned int irq)
* 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 --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 4b6477b4d8f9..b0cb040963e9 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -264,7 +264,7 @@ cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS];
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 --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index e5ad7e03fc7f..97de0290c9be 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -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, int version)
}
#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 --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c
index 670a71efafb3..05d9f8f363a6 100644
--- a/arch/i386/kernel/msr.c
+++ b/arch/i386/kernel/msr.c
@@ -291,7 +291,7 @@ static struct notifier_block msr_class_cpu_notifier =
.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 --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 5bdb839b2bb6..4889645c6cd6 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -56,7 +56,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 --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c
index 847ba44c2e06..cef1810a55a3 100644
--- a/arch/i386/kernel/quirks.c
+++ b/arch/i386/kernel/quirks.c
@@ -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 --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c
index be61aa8af188..7aafc7523f5f 100644
--- a/arch/i386/kernel/semaphore.c
+++ b/arch/i386/kernel/semaphore.c
@@ -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 semaphore * sem)
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_interruptible(struct semaphore * sem)
* 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 --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 61f9bddc8906..a781721851dd 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -428,10 +428,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 --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index 77813437707f..6b5c98f3683a 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -403,7 +403,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 --git a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c
index d561229e4826..963833f8c74e 100644
--- a/arch/i386/kernel/time_hpet.c
+++ b/arch/i386/kernel/time_hpet.c
@@ -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, unsigned long a)
* 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 --git a/arch/i386/kernel/timers/timer_hpet.c b/arch/i386/kernel/timers/timer_hpet.c
index 56d8fc1ea1bf..713134e71844 100644
--- a/arch/i386/kernel/timers/timer_hpet.c
+++ b/arch/i386/kernel/timers/timer_hpet.c
@@ -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 --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 065649245cde..ec89638e71fa 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -814,7 +814,7 @@ fastcall void do_coprocessor_error(struct pt_regs * regs, long error_code)
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 --git a/arch/i386/mach-default/topology.c b/arch/i386/mach-default/topology.c
index 8e4f0ab374e4..5b3e8817dae8 100644
--- a/arch/i386/mach-default/topology.c
+++ b/arch/i386/mach-default/topology.c
@@ -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 --git a/arch/i386/mach-visws/mpparse.c b/arch/i386/mach-visws/mpparse.c
index fa800641ae5a..5a22082147f4 100644
--- a/arch/i386/mach-visws/mpparse.c
+++ b/arch/i386/mach-visws/mpparse.c
@@ -36,7 +36,7 @@ unsigned int __initdata maxcpus = NR_CPUS;
* 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 --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index dbccec4894c0..9826f03dc9a3 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -650,7 +650,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;
@@ -723,7 +723,7 @@ static void setup_APIC_timer(unsigned int clocks)
#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 --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c
index 8bc3d658efd6..6a011a12d017 100644
--- a/arch/x86_64/kernel/i8259.c
+++ b/arch/x86_64/kernel/i8259.c
@@ -148,7 +148,7 @@ static void end_8259A_irq (unsigned int irq)
#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)
{
@@ -272,7 +272,7 @@ static inline int i8259A_irq_real(unsigned int irq)
* 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 --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 7f5f57e54740..7ec031c6ca10 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -46,7 +46,7 @@ unsigned char mp_bus_id_to_type [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1
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 --git a/arch/x86_64/kernel/msr.c b/arch/x86_64/kernel/msr.c
index 89ad3e72947f..598953ab0154 100644
--- a/arch/x86_64/kernel/msr.c
+++ b/arch/x86_64/kernel/msr.c
@@ -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 --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c
index 0282960ddc91..33feab9c7569 100644
--- a/arch/x86_64/kernel/process.c
+++ b/arch/x86_64/kernel/process.c
@@ -53,7 +53,7 @@ asmlinkage extern void ret_from_fork(void);
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 --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index b0df27f80bac..fad50e22e729 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -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 --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c
index d9aaa42500d0..0ef7a0065ece 100644
--- a/drivers/block/cfq-iosched.c
+++ b/drivers/block/cfq-iosched.c
@@ -1795,7 +1795,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 --git a/drivers/block/deadline-iosched.c b/drivers/block/deadline-iosched.c
index 820baa66291b..5558d712ecbd 100644
--- a/drivers/block/deadline-iosched.c
+++ b/drivers/block/deadline-iosched.c
@@ -909,7 +909,7 @@ static struct sysfs_ops deadline_sysfs_ops = {
.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 --git a/drivers/block/elevator.c b/drivers/block/elevator.c
index 85c72dd3dfee..6b79b4314622 100644
--- a/drivers/block/elevator.c
+++ b/drivers/block/elevator.c
@@ -92,7 +92,7 @@ inline int elv_try_last_merge(request_queue_t *q, struct bio *bio)
}
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 --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index bf52e9bf2393..42dfa281a880 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4217,7 +4217,7 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data)
return get_disk(disks[drive]);
}
-int __init floppy_init(void)
+static int __init floppy_init(void)
{
int i, unit, drive;
int err, dr;
@@ -4551,7 +4551,7 @@ static void floppy_release_irq_and_dma(void)
#ifdef MODULE
-char *floppy;
+static char *floppy;
static void unregister_devfs_entries(int drive)
{
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 49bd42f55920..6f011d0d8e97 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -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 --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 2f5cc3e251c6..8d3aaebadeb4 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -315,7 +315,7 @@ static inline int sock_recv_bvec(struct socket *sock, struct bio_vec *bvec)
}
/* 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 --git a/drivers/block/rd.c b/drivers/block/rd.c
index 80848c2a7bbe..6a126ee370d6 100644
--- a/drivers/block/rd.c
+++ b/drivers/block/rd.c
@@ -86,7 +86,7 @@ int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */
* 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 --git a/drivers/block/umem.c b/drivers/block/umem.c
index 86a21e456d8e..0c4c121d2e79 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -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 --git a/drivers/block/xd.c b/drivers/block/xd.c
index 3fbadc82ad43..1676033da6c6 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -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 --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 2ccde4de37cc..770b607d974e 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -381,7 +381,7 @@ static struct file_operations ISILoad_fops = {
.ioctl = ISILoad_ioctl,
};
-struct miscdevice isiloader_device = {
+static struct miscdevice isiloader_device = {
ISILOAD_MISC_MINOR, "isictl", &ISILoad_fops
};
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index c9fc16f36deb..ec949e4c070f 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -2313,7 +2313,7 @@ void isr_rxrdy(SLMP_INFO * info)
tty_flip_buffer_push(tty);
}
-void isr_txeom(SLMP_INFO * info, unsigned char status)
+static void isr_txeom(SLMP_INFO * info, unsigned char status)
{
if ( debug_level >= DEBUG_LEVEL_ISR )
printk("%s(%d):%s isr_txeom status=%02x\n",
@@ -3815,7 +3815,7 @@ void add_device(SLMP_INFO *info)
*
* Return Value: pointer to SLMP_INFO if success, otherwise NULL
*/
-SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev)
+static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev)
{
SLMP_INFO *info;
@@ -5205,7 +5205,7 @@ int irq_test(SLMP_INFO *info)
/* initialize individual SCA device (2 ports)
*/
-int sca_init(SLMP_INFO *info)
+static int sca_init(SLMP_INFO *info)
{
/* set wait controller to single mem partition (low), no wait states */
write_reg(info, PABR0, 0); /* wait controller addr boundary 0 */
diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c
index a70dd81f4d1b..9da395fa7794 100644
--- a/drivers/char/watchdog/machzwd.c
+++ b/drivers/char/watchdog/machzwd.c
@@ -488,7 +488,7 @@ out:
}
-void __exit zf_exit(void)
+static void __exit zf_exit(void)
{
zf_timer_off();
diff --git a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c
index d17d485fb7c6..24401e84729e 100644
--- a/drivers/char/watchdog/sc1200wdt.c
+++ b/drivers/char/watchdog/sc1200wdt.c
@@ -74,9 +74,9 @@ static char banner[] __initdata = KERN_INFO PFX SC1200_MODULE_VER;
static int timeout = 1;
static int io = -1;
static int io_len = 2; /* for non plug and play */
-struct semaphore open_sem;
+static struct semaphore open_sem;
static char expect_close;
-spinlock_t sc1200wdt_lock; /* io port access serialisation */
+static spinlock_t sc1200wdt_lock; /* io port access serialisation */
#if defined CONFIG_PNP
static int isapnp = 1;
@@ -335,7 +335,7 @@ static int __init sc1200wdt_probe(void)
#if defined CONFIG_PNP
-struct pnp_device_id scl200wdt_pnp_devices[] = {
+static struct pnp_device_id scl200wdt_pnp_devices[] = {
/* National Semiconductor PC87307/PC97307 watchdog component */
{.id = "NSC0800", .driver_data = 0},
{.id = ""},
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 8adef650d300..dfc81dc41789 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -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 *SCp)
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_dev_attrs[] = {
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 --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
index f7693d7c8eec..f25c7bce227e 100644
--- a/drivers/scsi/53c700.h
+++ b/drivers/scsi/53c700.h
@@ -63,7 +63,6 @@ struct Scsi_Host *NCR_700_detect(struct scsi_host_template *,
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 --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index abb55c1e2ddd..53c9b93013f1 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -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 --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index f96c4906693b..e46096da8db2 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -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_template = {
#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 *host, Scsi_Device * scsi_devs)
/* 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 --git a/drivers/scsi/ips.h b/drivers/scsi/ips.h
index d1553a0a3096..906a76158fa9 100644
--- a/drivers/scsi/ips.h
+++ b/drivers/scsi/ips.h
@@ -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 --git a/drivers/scsi/psi240i.c b/drivers/scsi/psi240i.c
index 03df5b630cd9..0f576d4ad0dd 100644
--- a/drivers/scsi/psi240i.c
+++ b/drivers/scsi/psi240i.c
@@ -390,7 +390,7 @@ static irqreturn_t do_Irq_Handler (int irq, void *dev_id, struct pt_regs *regs)
* 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 *SCpnt, void (*done)(Scsi_Cmnd *))
* 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 base, USHORT length, USHORT port)
* 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_Host *shost)
* 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 --git a/drivers/scsi/psi240i.h b/drivers/scsi/psi240i.h
index 536059b0fc06..6a598766df51 100644
--- a/drivers/scsi/psi240i.h
+++ b/drivers/scsi/psi240i.h
@@ -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 --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 47c3d08e01f2..11b2e5648672 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -511,7 +511,7 @@ static int sr_block_media_changed(struct gendisk *disk)
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 --git a/drivers/scsi/sym53c416.c b/drivers/scsi/sym53c416.c
index fbfc0c06d409..f26c3a29e631 100644
--- a/drivers/scsi/sym53c416.c
+++ b/drivers/scsi/sym53c416.c
@@ -616,7 +616,7 @@ static struct isapnp_device_id id_table[] __devinitdata = {
MODULE_DEVICE_TABLE(isapnp, id_table);
-void sym53c416_probe(void)
+static void sym53c416_probe(void)
{
int *base = probeaddrs;
int ints[2];
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c
index 3d0a0f2f7f89..7484916fe2aa 100644
--- a/drivers/scsi/ultrastor.c
+++ b/drivers/scsi/ultrastor.c
@@ -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 --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c
index 497da888185e..ed87832d789c 100644
--- a/drivers/video/asiliantfb.c
+++ b/drivers/video/asiliantfb.c
@@ -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 *p, u8 reg, u8 data)
}
#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_driver = {
.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 --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 617f63e69134..0255c61df620 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -515,23 +515,25 @@ static const struct {
/*--- Interface used by the world ------------------------------------------*/
-int cirrusfb_init (void);
-int cirrusfb_setup (char *options);
-
-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_init (void);
+#ifndef MODULE
+static int cirrusfb_setup (char *options);
+#endif
+
+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 (const char *name, unsigned char val);
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, int user)
}
/*--- 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, int bpp, long *div)
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 fb_info *info)
/* 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, unsigned red, unsigned green,
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_screeninfo *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(struct cirrusfb_info *cinfo,
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(struct cirrusfb_info *cinfo,
}
-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 *info, const struct fb_copyarea *area)
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_zorro_driver = {
};
#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 Garzik <jgarzik@pobox.com>");
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 --git a/drivers/video/i810/i810_gtf.c b/drivers/video/i810/i810_gtf.c
index 814698b90fb6..64f087a4466b 100644
--- a/drivers/video/i810/i810_gtf.c
+++ b/drivers/video/i810/i810_gtf.c
@@ -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 --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index 2a128e6cbad8..c51b4a7de7d4 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -635,7 +635,7 @@ static void i810_save_vga_state(struct i810fb_par *par)
* 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 *m, u32 *n, u32 *p)
* 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_par *par,
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(struct pci_dev *dev)
}
#ifndef MODULE
-int __init i810fb_init(void)
+static int __init i810fb_init(void)
{
char *option = NULL;
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index cc37117f4c05..98e00d8601e5 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -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 --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h
index a98de7952868..942ec768abd9 100644
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -764,7 +764,6 @@ void matroxfb_unregister_driver(struct matroxfb_driver* drv);
#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 --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index 9c67b4b0b7a8..aa4551522358 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -1338,8 +1338,8 @@ static void __devexit sst_shutdown(struct fb_info *info)
/*
* 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 --git a/fs/hpfs/alloc.c b/fs/hpfs/alloc.c
index 2baa977ffa1d..5503e2c28910 100644
--- a/fs/hpfs/alloc.c
+++ b/fs/hpfs/alloc.c
@@ -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 super_block *s, secno near, int lock)
/* 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 --git a/fs/hpfs/dentry.c b/fs/hpfs/dentry.c
index 706c6fef471c..08319126b2af 100644
--- a/fs/hpfs/dentry.c
+++ b/fs/hpfs/dentry.c
@@ -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 *dentry, struct qstr *qstr)
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 *dentry, struct qstr *a, struct qstr *b)
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 --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
index 9794e2fc2b9a..1d21307730a8 100644
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -78,7 +78,7 @@ static void for_all_poss(struct inode *inode, void (*f)(loff_t *, loff_t, loff_t
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, loff_t t)
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, loff_t c)
}
}
-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 super_block *s, struct dnode *d, unsigned
/* 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_block *s, struct dnode *d)
/* 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 --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h
index ebe670a02170..6094185d6ebf 100644
--- a/fs/hpfs/hpfs_fn.h
+++ b/fs/hpfs/hpfs_fn.h
@@ -202,7 +202,6 @@ static inline unsigned tstbits(unsigned *bmp, unsigned b, unsigned n)
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_ops;
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 hpfs_aops;
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 --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c
index 28483e9e76dc..38b1741fa539 100644
--- a/fs/hpfs/inode.c
+++ b/fs/hpfs/inode.c
@@ -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 --git a/fs/hpfs/name.c b/fs/hpfs/name.c
index cb703c2ad130..1f4a964384eb 100644
--- a/fs/hpfs/name.c
+++ b/fs/hpfs/name.c
@@ -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 --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 34074b3782c3..8eefa6366db7 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -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 --git a/fs/ncpfs/ncplib_kernel.c b/fs/ncpfs/ncplib_kernel.c
index 51969f278a6b..e4eb5ed4bee4 100644
--- a/fs/ncpfs/ncplib_kernel.c
+++ b/fs/ncpfs/ncplib_kernel.c
@@ -933,7 +933,7 @@ int ncp_search_for_fileset(struct ncp_server *server,
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 --git a/fs/qnx4/bitmap.c b/fs/qnx4/bitmap.c
index ea634dc47b92..991253927658 100644
--- a/fs/qnx4/bitmap.c
+++ b/fs/qnx4/bitmap.c
@@ -28,8 +28,8 @@ int qnx4_new_block(struct super_block *sb)
return 0;
}
-void count_bits(register const char *bmPart, register int size,
- int *const tf)
+static void count_bits(register const char *bmPart, register int size,
+ int *const tf)
{
char b;
int tot = *tf;
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index d46a09f9afbc..aa92d6b76a9a 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -162,8 +162,8 @@ static int qnx4_remount(struct super_block *sb, int *flags, char *data)
return 0;
}
-struct buffer_head *qnx4_getblk(struct inode *inode, int nr,
- int create)
+static struct buffer_head *qnx4_getblk(struct inode *inode, int nr,
+ int create)
{
struct buffer_head *result = NULL;
@@ -212,7 +212,7 @@ struct buffer_head *qnx4_bread(struct inode *inode, int block, int create)
return NULL;
}
-int qnx4_get_block( struct inode *inode, sector_t iblock, struct buffer_head *bh, int create )
+static int qnx4_get_block( struct inode *inode, sector_t iblock, struct buffer_head *bh, int create )
{
unsigned long phys;
@@ -447,7 +447,7 @@ static sector_t qnx4_bmap(struct address_space *mapping, sector_t block)
{
return generic_block_bmap(mapping,block,qnx4_get_block);
}
-struct address_space_operations qnx4_aops = {
+static struct address_space_operations qnx4_aops = {
.readpage = qnx4_readpage,
.writepage = qnx4_writepage,
.sync_page = block_sync_page,
diff --git a/include/asm-i386/cpu.h b/include/asm-i386/cpu.h
index a2e581ffc91f..002740b21951 100644
--- a/include/asm-i386/cpu.h
+++ b/include/asm-i386/cpu.h
@@ -11,7 +11,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 --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h
index 76fb1e0fdcb5..6e20b079f1d3 100644
--- a/include/asm-i386/hpet.h
+++ b/include/asm-i386/hpet.h
@@ -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 --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h
index e96814d75bae..d9fafba075bc 100644
--- a/include/asm-i386/mpspec.h
+++ b/include/asm-i386/mpspec.h
@@ -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 --git a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h
index 1452af116f92..ea563da63e24 100644
--- a/include/asm-i386/semaphore.h
+++ b/include/asm-i386/semaphore.h
@@ -92,11 +92,6 @@ fastcall int __down_failed_interruptible(void /* params in registers */);
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 --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h
index f93aa378459a..8557352dadcc 100644
--- a/include/asm-x86_64/mpspec.h
+++ b/include/asm-x86_64/mpspec.h
@@ -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 --git a/include/linux/audit.h b/include/linux/audit.h
index c27b028ec3c8..40450a738b21 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -173,16 +173,10 @@ extern void audit_log_format(struct audit_buffer *ab,
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,
@@ -195,13 +189,7 @@ extern void audit_log_lost(const char *message);
#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 --git a/include/linux/capability.h b/include/linux/capability.h
index 5df11c20ed26..8d139f4acf23 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -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 --git a/include/linux/efi.h b/include/linux/efi.h
index 0f461df7686c..047e7222df7a 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -301,7 +301,6 @@ extern u64 efi_mem_attributes (unsigned long phys_addr);
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 --git a/include/linux/module.h b/include/linux/module.h
index 7c66600fc66b..c9a6fbd31221 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -572,7 +572,6 @@ struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \
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 --git a/include/linux/pm.h b/include/linux/pm.h
index 1d106a3edad5..ed2b76e75199 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -116,11 +116,6 @@ void __deprecated pm_unregister(struct pm_dev *dev);
void __deprecated pm_unregister_all(pm_callback callback);
/*
- * Send a request to a single device
- */
-int __deprecated pm_send(struct pm_dev *dev, pm_request_t rqst, void *data);
-
-/*
* Send a request to all devices
*/
int __deprecated pm_send_all(pm_request_t rqst, void *data);
@@ -140,11 +135,6 @@ static inline void pm_unregister(struct pm_dev *dev) {}
static inline void pm_unregister_all(pm_callback callback) {}
-static inline int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
- return 0;
-}
-
static inline int pm_send_all(pm_request_t rqst, void *data)
{
return 0;
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index 53233c8fb3ef..22ba580b0ae8 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -114,7 +114,6 @@ extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, stru
extern unsigned long qnx4_count_free_blocks(struct super_block *sb);
extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
-extern struct buffer_head *qnx4_getblk(struct inode *, int, int);
extern struct buffer_head *qnx4_bread(struct inode *, int, int);
extern struct inode_operations qnx4_file_inode_operations;
@@ -130,7 +129,6 @@ extern int qnx4_unlink(struct inode *dir, struct dentry *dentry);
extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry);
extern int qnx4_sync_file(struct file *file, struct dentry *dentry, int);
extern int qnx4_sync_inode(struct inode *inode);
-extern int qnx4_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh, int create);
static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb)
{
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 0c7ae4f678a2..15d4afdd9ea0 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -114,7 +114,6 @@ extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
/* 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 --git a/include/linux/timex.h b/include/linux/timex.h
index b54c288dd6b8..74fdd07d3792 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -240,9 +240,7 @@ extern long time_precision; /* clock precision (us) */
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 --git a/kernel/acct.c b/kernel/acct.c
index 78ed87b13de6..035669624b6c 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -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 --git a/kernel/audit.c b/kernel/audit.c
index 9e9471002eae..0f84dd7af2c8 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -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 audit_buffer *ab)
}
/* 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, audit_tasklet_handler, 0);
* 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_buffer *ab)
/* 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 --git a/kernel/capability.c b/kernel/capability.c
index b828d545a97b..64db1ee820c2 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -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 --git a/kernel/fork.c b/kernel/fork.c
index 19a56e20f3c1..5b67b3ebf3c0 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -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);
@@ -1233,24 +1251,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 --git a/kernel/intermodule.c b/kernel/intermodule.c
index 9078649382cf..388977f3e9b7 100644
--- a/kernel/intermodule.c
+++ b/kernel/intermodule.c
@@ -113,7 +113,7 @@ void inter_module_unregister(const char *im_name)
* 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_name)
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 --git a/kernel/power/main.c b/kernel/power/main.c
index 0f78207cfb57..b0315cbad9b9 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -115,7 +115,7 @@ static void suspend_finish(suspend_state_t state)
-char * pm_states[] = {
+static char * pm_states[] = {
[PM_SUSPEND_STANDBY] = "standby",
[PM_SUSPEND_MEM] = "mem",
[PM_SUSPEND_DISK] = "disk",
diff --git a/kernel/power/pm.c b/kernel/power/pm.c
index 8fca5822a807..61deda04e39e 100644
--- a/kernel/power/pm.c
+++ b/kernel/power/pm.c
@@ -151,7 +151,7 @@ void pm_unregister_all(pm_callback callback)
* execution and unload yourself.
*/
-int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data)
+static int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data)
{
int status = 0;
unsigned long prev_state, next_state;
diff --git a/kernel/power/smp.c b/kernel/power/smp.c
index cda77cdfb8c1..7fa7f6e2b7fb 100644
--- a/kernel/power/smp.c
+++ b/kernel/power/smp.c
@@ -42,7 +42,7 @@ static void smp_pause(void * data)
__restore_processor_state(&ctxt);
}
-cpumask_t oldmask;
+static cpumask_t oldmask;
void disable_nonboot_cpus(void)
{
diff --git a/kernel/resource.c b/kernel/resource.c
index 72596bc6fdaf..35c99ac02c7c 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -91,7 +91,7 @@ static int r_show(struct seq_file *m, void *v)
return 0;
}
-struct seq_operations resource_op = {
+static struct seq_operations resource_op = {
.start = r_start,
.next = r_next,
.stop = r_stop,
diff --git a/kernel/signal.c b/kernel/signal.c
index 05c65254be47..b7657aecdc12 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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 --git a/kernel/sys.c b/kernel/sys.c
index 51f8f3a183f2..462d78d55895 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -90,7 +90,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
@@ -1540,7 +1540,7 @@ asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)
* 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 --git a/kernel/timer.c b/kernel/timer.c
index 167f5b9e65bd..ecb3d67c0e14 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -589,10 +589,10 @@ long time_tolerance = MAXFREQ; /* frequency tolerance (ppm) */
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 --git a/lib/kernel_lock.c b/lib/kernel_lock.c
index c739bfcad659..99b0ae3d51dd 100644
--- a/lib/kernel_lock.c
+++ b/lib/kernel_lock.c
@@ -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 --git a/mm/shmem.c b/mm/shmem.c
index c8fa573e030d..28e408dca31b 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2172,7 +2172,7 @@ static int shmem_xattr_security_set(struct inode *inode, const char *name, const
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 --git a/mm/thrash.c b/mm/thrash.c
index 735a91baa6ff..11461f7ad830 100644
--- a/mm/thrash.c
+++ b/mm/thrash.c
@@ -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 --git a/security/seclvl.c b/security/seclvl.c
index 6a06bb224fe8..8a0ab0d7949e 100644
--- a/security/seclvl.c
+++ b/security/seclvl.c
@@ -170,7 +170,7 @@ seclvl_attr_show(struct kobject *kobj, struct attribute *attr, char *buf)
/**
* 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, const char *buff, size_t count)
}
/* 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 *obj, const char *buff, size_t count)
}
/* 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);