Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc: fix sparse warnings in irq_32.c

Fix following sparse warnings:
symbol 'static_irqaction' was not declared. Should it be static?
symbol 'static_irq_count' was not declared. Should it be static?
symbol 'irq_action_lock' was not declared. Should it be static?
symbol 'unexpected_irq' was not declared. Should it be static?
symbol 'handler_irq' was not declared. Should it be static?
returning void-valued expression
returning void-valued expression
returning void-valued expression
symbol 'init_IRQ' was not declared. Should it be static?

Warnings were fixed by addding proper declarations
and fixing return path of a few functions.

There remains several warnings all related to the floppy driver.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sam Ravnborg and committed by
David S. Miller
81265fd9 7105de84

+20 -5
+1
arch/sparc/include/asm/irq_32.h
··· 12 12 13 13 #define irq_canonicalize(irq) (irq) 14 14 15 + extern void __init init_IRQ(void); 15 16 #endif
+3 -1
arch/sparc/kernel/entry.h
··· 5 5 #include <linux/types.h> 6 6 #include <linux/init.h> 7 7 8 + /* irq */ 9 + extern void handler_irq(int irq, struct pt_regs *regs); 10 + 8 11 #ifdef CONFIG_SPARC32 9 12 /* traps */ 10 13 extern void do_hw_interrupt(struct pt_regs *regs, unsigned long type); ··· 222 219 extern struct ino_bucket *ivector_table; 223 220 extern unsigned long ivector_table_pa; 224 221 225 - extern void handler_irq(int irq, struct pt_regs *regs); 226 222 extern void init_irqwork_curcpu(void); 227 223 extern void __cpuinit sun4v_register_mondo_queues(int this_cpu); 228 224
+4 -3
arch/sparc/kernel/irq_32.c
··· 46 46 #include <asm/cacheflush.h> 47 47 #include <asm/irq_regs.h> 48 48 49 + #include "kernel.h" 49 50 #include "irq.h" 50 51 51 52 #ifdef CONFIG_SMP ··· 593 592 594 593 void disable_irq_nosync(unsigned int irq) 595 594 { 596 - return __disable_irq(irq); 595 + __disable_irq(irq); 597 596 } 598 597 EXPORT_SYMBOL(disable_irq_nosync); 599 598 600 599 void disable_irq(unsigned int irq) 601 600 { 602 - return __disable_irq(irq); 601 + __disable_irq(irq); 603 602 } 604 603 EXPORT_SYMBOL(disable_irq); 605 604 606 605 void enable_irq(unsigned int irq) 607 606 { 608 - return __enable_irq(irq); 607 + __enable_irq(irq); 609 608 } 610 609 611 610 EXPORT_SYMBOL(enable_irq);
+11
arch/sparc/kernel/kernel.h
··· 1 1 #ifndef __SPARC_KERNEL_H 2 2 #define __SPARC_KERNEL_H 3 + 4 + #include <linux/interrupt.h> 5 + 3 6 /* cpu.c */ 4 7 extern const char *sparc_cpu_type; 5 8 extern const char *sparc_fpu_type; ··· 18 15 unsigned long npc, unsigned long psr); 19 16 /* muldiv.c */ 20 17 extern int do_user_muldiv (struct pt_regs *, unsigned long); 18 + 19 + /* irq_32.c */ 20 + extern struct irqaction static_irqaction[]; 21 + extern int static_irq_count; 22 + extern spinlock_t irq_action_lock; 23 + 24 + extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); 25 + 21 26 #else /* CONFIG_SPARC32 */ 22 27 #endif /* CONFIG_SPARC32 */ 23 28 #endif /* !(__SPARC_KERNEL_H) */
+1 -1
arch/sparc/kernel/sun4d_irq.c
··· 40 40 #include <asm/cacheflush.h> 41 41 #include <asm/irq_regs.h> 42 42 43 + #include "kernel.h" 43 44 #include "irq.h" 44 45 45 46 /* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */ ··· 59 58 #define TIMER_IRQ 10 60 59 61 60 #define MAX_STATIC_ALLOC 4 62 - extern struct irqaction static_irqaction[MAX_STATIC_ALLOC]; 63 61 extern int static_irq_count; 64 62 static unsigned char sbus_tid[32]; 65 63