Commit a1676f3b authored by William Stinson's avatar William Stinson Committed by David S. Miller

Remove explicit initialization of static vars to zero

in Sparc ports.
parent 47f29261
...@@ -161,7 +161,7 @@ void sbus_iounmap(unsigned long addr, unsigned long size) ...@@ -161,7 +161,7 @@ void sbus_iounmap(unsigned long addr, unsigned long size)
static void *_sparc_alloc_io(unsigned int busno, unsigned long phys, static void *_sparc_alloc_io(unsigned int busno, unsigned long phys,
unsigned long size, char *name) unsigned long size, char *name)
{ {
static int printed_full = 0; static int printed_full;
struct xresource *xres; struct xresource *xres;
struct resource *res; struct resource *res;
char *tack; char *tack;
......
...@@ -91,7 +91,7 @@ void (*init_timers)(void (*)(int, void *,struct pt_regs *)) = ...@@ -91,7 +91,7 @@ void (*init_timers)(void (*)(int, void *,struct pt_regs *)) =
*/ */
#define MAX_STATIC_ALLOC 4 #define MAX_STATIC_ALLOC 4
struct irqaction static_irqaction[MAX_STATIC_ALLOC]; struct irqaction static_irqaction[MAX_STATIC_ALLOC];
int static_irq_count = 0; int static_irq_count;
struct irqaction *irq_action[NR_IRQS+1] = { struct irqaction *irq_action[NR_IRQS+1] = {
NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL , NULL, NULL,
......
...@@ -185,7 +185,7 @@ static struct pcic_sn2list pcic_known_sysnames[] = { ...@@ -185,7 +185,7 @@ static struct pcic_sn2list pcic_known_sysnames[] = {
* Only one PCIC per IIep, * Only one PCIC per IIep,
* and since we have no SMP IIep, only one per system. * and since we have no SMP IIep, only one per system.
*/ */
static int pcic0_up = 0; static int pcic0_up;
static struct linux_pcic pcic0; static struct linux_pcic pcic0;
unsigned int pcic_regs; unsigned int pcic_regs;
......
...@@ -63,9 +63,9 @@ int cpu_idle(void) ...@@ -63,9 +63,9 @@ int cpu_idle(void)
for (;;) { for (;;) {
if (ARCH_SUN4C_SUN4) { if (ARCH_SUN4C_SUN4) {
static int count = HZ; static int count = HZ;
static unsigned long last_jiffies = 0; static unsigned long last_jiffies;
static unsigned long last_faults = 0; static unsigned long last_faults;
static unsigned long fps = 0; static unsigned long fps;
unsigned long now; unsigned long now;
unsigned long faults; unsigned long faults;
unsigned long flags; unsigned long flags;
......
...@@ -47,7 +47,7 @@ extern struct task_struct *current_set[NR_CPUS]; ...@@ -47,7 +47,7 @@ extern struct task_struct *current_set[NR_CPUS];
extern volatile int smp_processors_ready; extern volatile int smp_processors_ready;
extern unsigned long cpu_present_map; extern unsigned long cpu_present_map;
extern int smp_num_cpus; extern int smp_num_cpus;
static int smp_highest_cpu = 0; static int smp_highest_cpu;
extern int smp_threads_ready; extern int smp_threads_ready;
extern unsigned char mid_xlate[NR_CPUS]; extern unsigned char mid_xlate[NR_CPUS];
extern volatile unsigned long cpu_callin_map[NR_CPUS]; extern volatile unsigned long cpu_callin_map[NR_CPUS];
......
...@@ -115,7 +115,7 @@ __volatile__ unsigned int *master_l10_limit; ...@@ -115,7 +115,7 @@ __volatile__ unsigned int *master_l10_limit;
void timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) void timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{ {
/* last time the cmos clock got updated */ /* last time the cmos clock got updated */
static long last_rtc_update=0; static long last_rtc_update;
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
if(!user_mode(regs)) if(!user_mode(regs))
......
...@@ -272,7 +272,7 @@ extern int do_mathemu(struct pt_regs *, struct task_struct *); ...@@ -272,7 +272,7 @@ extern int do_mathemu(struct pt_regs *, struct task_struct *);
void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc, void do_fpe_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
unsigned long psr) unsigned long psr)
{ {
static int calls = 0; static int calls;
siginfo_t info; siginfo_t info;
unsigned long fsr; unsigned long fsr;
int ret = 0; int ret = 0;
......
...@@ -25,7 +25,7 @@ extern int viking_mxcc_present; ...@@ -25,7 +25,7 @@ extern int viking_mxcc_present;
BTFIXUPDEF_CALL(void, flush_page_for_dma, unsigned long) BTFIXUPDEF_CALL(void, flush_page_for_dma, unsigned long)
#define flush_page_for_dma(page) BTFIXUP_CALL(flush_page_for_dma)(page) #define flush_page_for_dma(page) BTFIXUP_CALL(flush_page_for_dma)(page)
extern int flush_page_for_dma_global; extern int flush_page_for_dma_global;
static int viking_flush = 0; static int viking_flush;
/* viking.S */ /* viking.S */
extern void viking_flush_page(unsigned long page); extern void viking_flush_page(unsigned long page);
extern void viking_mxcc_flush_page(unsigned long page); extern void viking_mxcc_flush_page(unsigned long page);
......
...@@ -1739,7 +1739,7 @@ static void __init init_tsunami(void) ...@@ -1739,7 +1739,7 @@ static void __init init_tsunami(void)
static void __init poke_viking(void) static void __init poke_viking(void)
{ {
unsigned long mreg = srmmu_get_mmureg(); unsigned long mreg = srmmu_get_mmureg();
static int smp_catch = 0; static int smp_catch;
if(viking_mxcc_present) { if(viking_mxcc_present) {
unsigned long mxcc_control = mxcc_get_creg(); unsigned long mxcc_control = mxcc_get_creg();
......
...@@ -1061,7 +1061,7 @@ static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1061,7 +1061,7 @@ static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
break; break;
default: default:
do { do {
static int count = 0; static int count;
if (++count <= 20) if (++count <= 20)
printk("%s: Unknown fb ioctl cmd fd(%d) " printk("%s: Unknown fb ioctl cmd fd(%d) "
"cmd(%08x) arg(%08lx)\n", "cmd(%08x) arg(%08lx)\n",
...@@ -1714,7 +1714,7 @@ static int ppp_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1714,7 +1714,7 @@ static int ppp_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
break; break;
default: default:
do { do {
static int count = 0; static int count;
if (++count <= 20) if (++count <= 20)
printk("ppp_ioctl: Unknown cmd fd(%d) " printk("ppp_ioctl: Unknown cmd fd(%d) "
"cmd(%08x) arg(%08x)\n", "cmd(%08x) arg(%08x)\n",
...@@ -1824,7 +1824,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -1824,7 +1824,7 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
break; break;
default: default:
do { do {
static int count = 0; static int count;
if (++count <= 20) if (++count <= 20)
printk("mt_ioctl: Unknown cmd fd(%d) " printk("mt_ioctl: Unknown cmd fd(%d) "
"cmd(%08x) arg(%08x)\n", "cmd(%08x) arg(%08x)\n",
...@@ -1942,7 +1942,7 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar ...@@ -1942,7 +1942,7 @@ static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long ar
break; break;
default: default:
do { do {
static int count = 0; static int count;
if (++count <= 20) if (++count <= 20)
printk("cdrom_ioctl: Unknown cmd fd(%d) " printk("cdrom_ioctl: Unknown cmd fd(%d) "
"cmd(%08x) arg(%08x)\n", "cmd(%08x) arg(%08x)\n",
...@@ -2029,7 +2029,7 @@ static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -2029,7 +2029,7 @@ static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
} }
break; break;
default: { default: {
static int count = 0; static int count;
if (++count <= 20) if (++count <= 20)
printk("%s: Unknown loop ioctl cmd, fd(%d) " printk("%s: Unknown loop ioctl cmd, fd(%d) "
"cmd(%08x) arg(%08lx)\n", "cmd(%08x) arg(%08lx)\n",
...@@ -4882,7 +4882,7 @@ asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -4882,7 +4882,7 @@ asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
handler = (void *)(long)t->handler; handler = (void *)(long)t->handler;
error = handler(fd, cmd, arg, filp); error = handler(fd, cmd, arg, filp);
} else { } else {
static int count = 0; static int count;
if (++count <= 20) if (++count <= 20)
printk("sys32_ioctl(%s:%d): Unknown cmd fd(%d) " printk("sys32_ioctl(%s:%d): Unknown cmd fd(%d) "
"cmd(%08x) arg(%08x)\n", "cmd(%08x) arg(%08x)\n",
......
...@@ -82,7 +82,7 @@ unsigned char dma_sync_reg_table_entry = 0; ...@@ -82,7 +82,7 @@ unsigned char dma_sync_reg_table_entry = 0;
*/ */
#define MAX_STATIC_ALLOC 4 #define MAX_STATIC_ALLOC 4
static struct irqaction static_irqaction[MAX_STATIC_ALLOC]; static struct irqaction static_irqaction[MAX_STATIC_ALLOC];
static int static_irq_count = 0; static int static_irq_count;
/* This is exported so that fast IRQ handlers can get at it... -DaveM */ /* This is exported so that fast IRQ handlers can get at it... -DaveM */
struct irqaction *irq_action[NR_IRQS+1] = { struct irqaction *irq_action[NR_IRQS+1] = {
......
...@@ -1159,7 +1159,7 @@ static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm) ...@@ -1159,7 +1159,7 @@ static struct pcidev_cookie *alloc_bridge_cookie(struct pci_pbm_info *pbm)
static void __init sabre_scan_bus(struct pci_controller_info *p) static void __init sabre_scan_bus(struct pci_controller_info *p)
{ {
static int once = 0; static int once;
struct pci_bus *sabre_bus; struct pci_bus *sabre_bus;
struct pci_pbm_info *pbm; struct pci_pbm_info *pbm;
struct pcidev_cookie *cookie; struct pcidev_cookie *cookie;
......
...@@ -22,7 +22,7 @@ static unsigned long power_reg = 0UL; ...@@ -22,7 +22,7 @@ static unsigned long power_reg = 0UL;
#define POWER_COURTESY_OFF (1 << 1) #define POWER_COURTESY_OFF (1 << 1)
static DECLARE_WAIT_QUEUE_HEAD(powerd_wait); static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
static int button_pressed = 0; static int button_pressed;
static void power_handler(int irq, void *dev_id, struct pt_regs *regs) static void power_handler(int irq, void *dev_id, struct pt_regs *regs)
{ {
...@@ -81,7 +81,7 @@ void __init power_init(void) ...@@ -81,7 +81,7 @@ void __init power_init(void)
{ {
struct linux_ebus *ebus; struct linux_ebus *ebus;
struct linux_ebus_device *edev; struct linux_ebus_device *edev;
static int invoked = 0; static int invoked;
if (invoked) if (invoked)
return; return;
......
...@@ -46,8 +46,8 @@ volatile int __cpu_number_map[NR_CPUS] __attribute__ ((aligned (SMP_CACHE_BYTES ...@@ -46,8 +46,8 @@ volatile int __cpu_number_map[NR_CPUS] __attribute__ ((aligned (SMP_CACHE_BYTES
volatile int __cpu_logical_map[NR_CPUS] __attribute__ ((aligned (SMP_CACHE_BYTES))); volatile int __cpu_logical_map[NR_CPUS] __attribute__ ((aligned (SMP_CACHE_BYTES)));
/* Please don't make this stuff initdata!!! --DaveM */ /* Please don't make this stuff initdata!!! --DaveM */
static unsigned char boot_cpu_id = 0; static unsigned char boot_cpu_id;
static int smp_activated = 0; static int smp_activated;
/* Kernel spinlock */ /* Kernel spinlock */
spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
...@@ -898,7 +898,7 @@ extern unsigned long xcall_capture; ...@@ -898,7 +898,7 @@ extern unsigned long xcall_capture;
static atomic_t smp_capture_depth = ATOMIC_INIT(0); static atomic_t smp_capture_depth = ATOMIC_INIT(0);
static atomic_t smp_capture_registry = ATOMIC_INIT(0); static atomic_t smp_capture_registry = ATOMIC_INIT(0);
static unsigned long penguins_are_doing_time = 0; static unsigned long penguins_are_doing_time;
void smp_capture(void) void smp_capture(void)
{ {
......
...@@ -380,7 +380,7 @@ asmlinkage unsigned long sys64_mremap(unsigned long addr, ...@@ -380,7 +380,7 @@ asmlinkage unsigned long sys64_mremap(unsigned long addr,
asmlinkage unsigned long asmlinkage unsigned long
c_sys_nis_syscall (struct pt_regs *regs) c_sys_nis_syscall (struct pt_regs *regs)
{ {
static int count=0; static int count;
/* Don't make the system unusable, if someone goes stuck */ /* Don't make the system unusable, if someone goes stuck */
if (count++ > 5) if (count++ > 5)
...@@ -450,7 +450,7 @@ asmlinkage int sys_aplib(void) ...@@ -450,7 +450,7 @@ asmlinkage int sys_aplib(void)
asmlinkage int solaris_syscall(struct pt_regs *regs) asmlinkage int solaris_syscall(struct pt_regs *regs)
{ {
static int count = 0; static int count;
regs->tpc = regs->tnpc; regs->tpc = regs->tnpc;
regs->tnpc += 4; regs->tnpc += 4;
...@@ -470,7 +470,7 @@ asmlinkage int solaris_syscall(struct pt_regs *regs) ...@@ -470,7 +470,7 @@ asmlinkage int solaris_syscall(struct pt_regs *regs)
#ifndef CONFIG_SUNOS_EMUL #ifndef CONFIG_SUNOS_EMUL
asmlinkage int sunos_syscall(struct pt_regs *regs) asmlinkage int sunos_syscall(struct pt_regs *regs)
{ {
static int count = 0; static int count;
regs->tpc = regs->tnpc; regs->tpc = regs->tnpc;
regs->tnpc += 4; regs->tnpc += 4;
......
...@@ -210,7 +210,7 @@ static char *vstrings[] = { ...@@ -210,7 +210,7 @@ static char *vstrings[] = {
asmlinkage void sunos_vadvise(u32 strategy) asmlinkage void sunos_vadvise(u32 strategy)
{ {
static int count = 0; static int count;
/* I wanna see who uses this... */ /* I wanna see who uses this... */
if (count++ < 5) if (count++ < 5)
......
...@@ -62,7 +62,7 @@ unsigned long timer_ticks_per_usec_quotient; ...@@ -62,7 +62,7 @@ unsigned long timer_ticks_per_usec_quotient;
static __inline__ void timer_check_rtc(void) static __inline__ void timer_check_rtc(void)
{ {
/* last time the cmos clock got updated */ /* last time the cmos clock got updated */
static long last_rtc_update=0; static long last_rtc_update;
/* Determine when to update the Mostek clock. */ /* Determine when to update the Mostek clock. */
if ((time_status & STA_UNSYNC) == 0 && if ((time_status & STA_UNSYNC) == 0 &&
...@@ -410,7 +410,7 @@ void __init clock_probe(void) ...@@ -410,7 +410,7 @@ void __init clock_probe(void)
struct linux_ebus *ebus = NULL; struct linux_ebus *ebus = NULL;
struct isa_bridge *isa_br = NULL; struct isa_bridge *isa_br = NULL;
#endif #endif
static int invoked = 0; static int invoked;
if (invoked) if (invoked)
return; return;
......
...@@ -699,7 +699,7 @@ static void __flush_nucleus_vptes(void) ...@@ -699,7 +699,7 @@ static void __flush_nucleus_vptes(void)
} }
} }
static int prom_ditlb_set = 0; static int prom_ditlb_set;
struct prom_tlb_entry { struct prom_tlb_entry {
int tlb_ent; int tlb_ent;
unsigned long tlb_tag; unsigned long tlb_tag;
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#define BARG_LEN 256 #define BARG_LEN 256
int bootstr_len = BARG_LEN; int bootstr_len = BARG_LEN;
static int bootstr_valid = 0; static int bootstr_valid;
static char bootstr_buf[BARG_LEN] = { 0 }; static char bootstr_buf[BARG_LEN];
char * __init char * __init
prom_getbootargs(void) prom_getbootargs(void)
......
...@@ -171,7 +171,7 @@ int prom_get_mmu_ihandle(void) ...@@ -171,7 +171,7 @@ int prom_get_mmu_ihandle(void)
static int prom_get_memory_ihandle(void) static int prom_get_memory_ihandle(void)
{ {
static int memory_ihandle_cache = 0; static int memory_ihandle_cache;
int node, ret; int node, ret;
if (memory_ihandle_cache != 0) if (memory_ihandle_cache != 0)
......
...@@ -57,7 +57,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o ...@@ -57,7 +57,7 @@ static u32 do_solaris_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u64 o
/* Do we need it here? */ /* Do we need it here? */
set_personality(PER_SVR4); set_personality(PER_SVR4);
if (flags & MAP_NORESERVE) { if (flags & MAP_NORESERVE) {
static int cnt = 0; static int cnt;
if (cnt < 5) { if (cnt < 5) {
printk("%s: unimplemented Solaris MAP_NORESERVE mmap() flag\n", printk("%s: unimplemented Solaris MAP_NORESERVE mmap() flag\n",
......
...@@ -46,7 +46,7 @@ static char * page = NULL ; ...@@ -46,7 +46,7 @@ static char * page = NULL ;
void * mykmalloc(size_t s, int gfp) void * mykmalloc(size_t s, int gfp)
{ {
static char * page; static char * page;
static size_t free = 0; static size_t free;
void * r; void * r;
s = ((s + 63) & ~63); s = ((s + 63) & ~63);
if( s > PAGE_SIZE ) { if( s > PAGE_SIZE ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment