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

[MIPS] Fix some sparse warnings on traps.c and irq-msc01.c

* Declare board_bind_eic_interrupt, board_watchpoint_handler in traps.h
* Make msc_bind_eic_interrupt static and fix its argument types.
* Make msc_levelirq_type, msc_edgeirq_type static.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Atsushi Nemoto and committed by
Ralf Baechle
411ba7fc 85580839

+6 -6
+4 -6
arch/mips/kernel/irq-msc01.c
··· 17 17 #include <asm/io.h> 18 18 #include <asm/irq.h> 19 19 #include <asm/msc01_ic.h> 20 + #include <asm/traps.h> 20 21 21 22 static unsigned long _icctrl_msc; 22 23 #define MSC01_IC_REG_BASE _icctrl_msc ··· 99 98 } 100 99 } 101 100 102 - void 103 - msc_bind_eic_interrupt(unsigned int irq, unsigned int set) 101 + static void msc_bind_eic_interrupt(int irq, int set) 104 102 { 105 103 MSCIC_WRITE(MSC01_IC_RAMW, 106 104 (irq<<MSC01_IC_RAMW_ADDR_SHF) | (set<<MSC01_IC_RAMW_DATA_SHF)); 107 105 } 108 106 109 - struct irq_chip msc_levelirq_type = { 107 + static struct irq_chip msc_levelirq_type = { 110 108 .name = "SOC-it-Level", 111 109 .ack = level_mask_and_ack_msc_irq, 112 110 .mask = mask_msc_irq, ··· 115 115 .end = end_msc_irq, 116 116 }; 117 117 118 - struct irq_chip msc_edgeirq_type = { 118 + static struct irq_chip msc_edgeirq_type = { 119 119 .name = "SOC-it-Edge", 120 120 .ack = edge_mask_and_ack_msc_irq, 121 121 .mask = mask_msc_irq, ··· 128 128 129 129 void __init init_msc_irqs(unsigned long icubase, unsigned int irqbase, msc_irqmap_t *imp, int nirq) 130 130 { 131 - extern void (*board_bind_eic_interrupt)(unsigned int irq, unsigned int regset); 132 - 133 131 _icctrl_msc = (unsigned long) ioremap(icubase, 0x40000); 134 132 135 133 /* Reset interrupt controller - initialises all registers to 0 */
+2
include/asm-mips/traps.h
··· 23 23 24 24 extern void (*board_nmi_handler_setup)(void); 25 25 extern void (*board_ejtag_handler_setup)(void); 26 + extern void (*board_bind_eic_interrupt)(int irq, int regset); 27 + extern void (*board_watchpoint_handler)(struct pt_regs *regs); 26 28 27 29 #endif /* _ASM_TRAPS_H */