Commit bd0b9ac4 authored by Thomas Gleixner's avatar Thomas Gleixner

genirq: Remove irq argument from irq flow handlers

Most interrupt flow handlers do not use the irq argument. Those few
which use it can retrieve the irq number from the irq descriptor.

Remove the argument.

Search and replace was done with coccinelle and some extra helper
scripts around it. Thanks to Julia for her help!
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
parent b237721c
...@@ -117,6 +117,6 @@ handle_irq(int irq) ...@@ -117,6 +117,6 @@ handle_irq(int irq)
} }
irq_enter(); irq_enter();
generic_handle_irq_desc(irq, desc); generic_handle_irq_desc(desc);
irq_exit(); irq_exit();
} }
...@@ -252,7 +252,7 @@ static struct irq_chip idu_irq_chip = { ...@@ -252,7 +252,7 @@ static struct irq_chip idu_irq_chip = {
static int idu_first_irq; static int idu_first_irq;
static void idu_cascade_isr(unsigned int __core_irq, struct irq_desc *desc) static void idu_cascade_isr(struct irq_desc *desc)
{ {
struct irq_domain *domain = irq_desc_get_handler_data(desc); struct irq_domain *domain = irq_desc_get_handler_data(desc);
unsigned int core_irq = irq_desc_get_irq(desc); unsigned int core_irq = irq_desc_get_irq(desc);
......
...@@ -95,7 +95,7 @@ void it8152_init_irq(void) ...@@ -95,7 +95,7 @@ void it8152_init_irq(void)
} }
} }
void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) void it8152_irq_demux(struct irq_desc *desc)
{ {
int bits_pd, bits_lp, bits_ld; int bits_pd, bits_lp, bits_ld;
int i; int i;
......
...@@ -138,7 +138,7 @@ static struct locomo_dev_info locomo_devices[] = { ...@@ -138,7 +138,7 @@ static struct locomo_dev_info locomo_devices[] = {
}, },
}; };
static void locomo_handler(unsigned int __irq, struct irq_desc *desc) static void locomo_handler(struct irq_desc *desc)
{ {
struct locomo *lchip = irq_desc_get_chip_data(desc); struct locomo *lchip = irq_desc_get_chip_data(desc);
int req, i; int req, i;
......
...@@ -196,10 +196,8 @@ static struct sa1111_dev_info sa1111_devices[] = { ...@@ -196,10 +196,8 @@ static struct sa1111_dev_info sa1111_devices[] = {
* active IRQs causes the interrupt output to pulse, the upper levels * active IRQs causes the interrupt output to pulse, the upper levels
* will call us again if there are more interrupts to process. * will call us again if there are more interrupts to process.
*/ */
static void static void sa1111_irq_handler(struct irq_desc *desc)
sa1111_irq_handler(unsigned int __irq, struct irq_desc *desc)
{ {
unsigned int irq = irq_desc_get_irq(desc);
unsigned int stat0, stat1, i; unsigned int stat0, stat1, i;
struct sa1111 *sachip = irq_desc_get_handler_data(desc); struct sa1111 *sachip = irq_desc_get_handler_data(desc);
void __iomem *mapbase = sachip->base + SA1111_INTC; void __iomem *mapbase = sachip->base + SA1111_INTC;
...@@ -214,7 +212,7 @@ sa1111_irq_handler(unsigned int __irq, struct irq_desc *desc) ...@@ -214,7 +212,7 @@ sa1111_irq_handler(unsigned int __irq, struct irq_desc *desc)
sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1); sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1);
if (stat0 == 0 && stat1 == 0) { if (stat0 == 0 && stat1 == 0) {
do_bad_IRQ(irq, desc); do_bad_IRQ(desc);
return; return;
} }
......
...@@ -106,7 +106,7 @@ extern void __iomem *it8152_base_address; ...@@ -106,7 +106,7 @@ extern void __iomem *it8152_base_address;
struct pci_dev; struct pci_dev;
struct pci_sys_data; struct pci_sys_data;
extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); extern void it8152_irq_demux(struct irq_desc *desc);
extern void it8152_init_irq(void); extern void it8152_init_irq(void);
extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); extern int it8152_pci_setup(int nr, struct pci_sys_data *sys);
......
...@@ -23,10 +23,10 @@ extern int show_fiq_list(struct seq_file *, int); ...@@ -23,10 +23,10 @@ extern int show_fiq_list(struct seq_file *, int);
/* /*
* This is for easy migration, but should be changed in the source * This is for easy migration, but should be changed in the source
*/ */
#define do_bad_IRQ(irq,desc) \ #define do_bad_IRQ(desc) \
do { \ do { \
raw_spin_lock(&desc->lock); \ raw_spin_lock(&desc->lock); \
handle_bad_irq(irq, desc); \ handle_bad_irq(desc); \
raw_spin_unlock(&desc->lock); \ raw_spin_unlock(&desc->lock); \
} while(0) } while(0)
......
...@@ -69,14 +69,14 @@ static struct irq_chip pmu_irq_chip = { ...@@ -69,14 +69,14 @@ static struct irq_chip pmu_irq_chip = {
.irq_ack = pmu_irq_ack, .irq_ack = pmu_irq_ack,
}; };
static void pmu_irq_handler(unsigned int __irq, struct irq_desc *desc) static void pmu_irq_handler(struct irq_desc *desc)
{ {
unsigned int irq = irq_desc_get_irq(desc);
unsigned long cause = readl(PMU_INTERRUPT_CAUSE); unsigned long cause = readl(PMU_INTERRUPT_CAUSE);
unsigned int irq;
cause &= readl(PMU_INTERRUPT_MASK); cause &= readl(PMU_INTERRUPT_MASK);
if (cause == 0) { if (cause == 0) {
do_bad_IRQ(irq, desc); do_bad_IRQ(desc);
return; return;
} }
......
...@@ -87,13 +87,12 @@ static struct irq_chip isa_hi_chip = { ...@@ -87,13 +87,12 @@ static struct irq_chip isa_hi_chip = {
.irq_unmask = isa_unmask_pic_hi_irq, .irq_unmask = isa_unmask_pic_hi_irq,
}; };
static void static void isa_irq_handler(struct irq_desc *desc)
isa_irq_handler(unsigned int irq, struct irq_desc *desc)
{ {
unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE; unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE;
if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) { if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) {
do_bad_IRQ(isa_irq, desc); do_bad_IRQ(desc);
return; return;
} }
......
...@@ -126,7 +126,7 @@ static int gpio_set_irq_type(struct irq_data *d, unsigned int type) ...@@ -126,7 +126,7 @@ static int gpio_set_irq_type(struct irq_data *d, unsigned int type)
return 0; return 0;
} }
static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) static void gpio_irq_handler(struct irq_desc *desc)
{ {
unsigned int port = (unsigned int)irq_desc_get_handler_data(desc); unsigned int port = (unsigned int)irq_desc_get_handler_data(desc);
unsigned int gpio_irq_no, irq_stat; unsigned int gpio_irq_no, irq_stat;
......
...@@ -85,7 +85,7 @@ static struct platform_device smsc_lan9217_device = { ...@@ -85,7 +85,7 @@ static struct platform_device smsc_lan9217_device = {
.resource = smsc911x_resources, .resource = smsc911x_resources,
}; };
static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) static void mxc_expio_irq_handler(struct irq_desc *desc)
{ {
u32 imr_val; u32 imr_val;
u32 int_valid; u32 int_valid;
......
...@@ -154,7 +154,7 @@ static inline void mxc_init_imx_uart(void) ...@@ -154,7 +154,7 @@ static inline void mxc_init_imx_uart(void)
imx31_add_imx_uart0(&uart_pdata); imx31_add_imx_uart0(&uart_pdata);
} }
static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc) static void mx31ads_expio_irq_handler(struct irq_desc *desc)
{ {
u32 imr_val; u32 imr_val;
u32 int_valid; u32 int_valid;
......
...@@ -91,7 +91,7 @@ static void (*write_imipr[])(u32) = { ...@@ -91,7 +91,7 @@ static void (*write_imipr[])(u32) = {
write_imipr_3, write_imipr_3,
}; };
static void iop13xx_msi_handler(unsigned int irq, struct irq_desc *desc) static void iop13xx_msi_handler(struct irq_desc *desc)
{ {
int i, j; int i, j;
unsigned long status; unsigned long status;
......
...@@ -370,7 +370,7 @@ static struct irq_chip lpc32xx_irq_chip = { ...@@ -370,7 +370,7 @@ static struct irq_chip lpc32xx_irq_chip = {
.irq_set_wake = lpc32xx_irq_wake .irq_set_wake = lpc32xx_irq_wake
}; };
static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc) static void lpc32xx_sic1_handler(struct irq_desc *desc)
{ {
unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC1_BASE)); unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC1_BASE));
...@@ -383,7 +383,7 @@ static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc) ...@@ -383,7 +383,7 @@ static void lpc32xx_sic1_handler(unsigned int irq, struct irq_desc *desc)
} }
} }
static void lpc32xx_sic2_handler(unsigned int irq, struct irq_desc *desc) static void lpc32xx_sic2_handler(struct irq_desc *desc)
{ {
unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC2_BASE)); unsigned long ints = __raw_readl(LPC32XX_INTC_STAT(LPC32XX_SIC2_BASE));
......
...@@ -69,8 +69,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -69,8 +69,7 @@ static struct platform_device *devices[] __initdata = {
#define DEBUG_IRQ(fmt...) while (0) {} #define DEBUG_IRQ(fmt...) while (0) {}
#endif #endif
static void static void netx_hif_demux_handler(struct irq_desc *desc)
netx_hif_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
{ {
unsigned int irq = NETX_IRQ_HIF_CHAINED(0); unsigned int irq = NETX_IRQ_HIF_CHAINED(0);
unsigned int stat; unsigned int stat;
......
...@@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d) ...@@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d)
fpga_ack_irq(d); fpga_ack_irq(d);
} }
static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) static void innovator_fpga_IRQ_demux(struct irq_desc *desc)
{ {
u32 stat; u32 stat;
int fpga_irq; int fpga_irq;
......
...@@ -102,7 +102,7 @@ static void omap_prcm_events_filter_priority(unsigned long *events, ...@@ -102,7 +102,7 @@ static void omap_prcm_events_filter_priority(unsigned long *events,
* dispatched accordingly. Clearing of the wakeup events should be * dispatched accordingly. Clearing of the wakeup events should be
* done by the SoC specific individual handlers. * done by the SoC specific individual handlers.
*/ */
static void omap_prcm_irq_handler(unsigned int irq, struct irq_desc *desc) static void omap_prcm_irq_handler(struct irq_desc *desc)
{ {
unsigned long pending[OMAP_PRCM_MAX_NR_PENDING_REG]; unsigned long pending[OMAP_PRCM_MAX_NR_PENDING_REG];
unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG]; unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG];
......
...@@ -496,7 +496,7 @@ static struct irq_chip balloon3_irq_chip = { ...@@ -496,7 +496,7 @@ static struct irq_chip balloon3_irq_chip = {
.irq_unmask = balloon3_unmask_irq, .irq_unmask = balloon3_unmask_irq,
}; };
static void balloon3_irq_handler(unsigned int __irq, struct irq_desc *desc) static void balloon3_irq_handler(struct irq_desc *desc)
{ {
unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
balloon3_irq_enabled; balloon3_irq_enabled;
......
...@@ -29,13 +29,12 @@ ...@@ -29,13 +29,12 @@
void __iomem *it8152_base_address; void __iomem *it8152_base_address;
static int cmx2xx_it8152_irq_gpio; static int cmx2xx_it8152_irq_gpio;
static void cmx2xx_it8152_irq_demux(unsigned int __irq, struct irq_desc *desc) static void cmx2xx_it8152_irq_demux(struct irq_desc *desc)
{ {
unsigned int irq = irq_desc_get_irq(desc);
/* clear our parent irq */ /* clear our parent irq */
desc->irq_data.chip->irq_ack(&desc->irq_data); desc->irq_data.chip->irq_ack(&desc->irq_data);
it8152_irq_demux(irq, desc); it8152_irq_demux(desc);
} }
void __cmx2xx_pci_init_irq(int irq_gpio) void __cmx2xx_pci_init_irq(int irq_gpio)
......
...@@ -120,7 +120,7 @@ static struct irq_chip lpd270_irq_chip = { ...@@ -120,7 +120,7 @@ static struct irq_chip lpd270_irq_chip = {
.irq_unmask = lpd270_unmask_irq, .irq_unmask = lpd270_unmask_irq,
}; };
static void lpd270_irq_handler(unsigned int __irq, struct irq_desc *desc) static void lpd270_irq_handler(struct irq_desc *desc)
{ {
unsigned int irq; unsigned int irq;
unsigned long pending; unsigned long pending;
......
...@@ -284,7 +284,7 @@ static struct irq_chip pcm990_irq_chip = { ...@@ -284,7 +284,7 @@ static struct irq_chip pcm990_irq_chip = {
.irq_unmask = pcm990_unmask_irq, .irq_unmask = pcm990_unmask_irq,
}; };
static void pcm990_irq_handler(unsigned int __irq, struct irq_desc *desc) static void pcm990_irq_handler(struct irq_desc *desc)
{ {
unsigned int irq; unsigned int irq;
unsigned long pending; unsigned long pending;
......
...@@ -276,7 +276,7 @@ static inline unsigned long viper_irq_pending(void) ...@@ -276,7 +276,7 @@ static inline unsigned long viper_irq_pending(void)
viper_irq_enabled_mask; viper_irq_enabled_mask;
} }
static void viper_irq_handler(unsigned int __irq, struct irq_desc *desc) static void viper_irq_handler(struct irq_desc *desc)
{ {
unsigned int irq; unsigned int irq;
unsigned long pending; unsigned long pending;
......
...@@ -105,7 +105,7 @@ static inline unsigned long zeus_irq_pending(void) ...@@ -105,7 +105,7 @@ static inline unsigned long zeus_irq_pending(void)
return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask; return __raw_readw(ZEUS_CPLD_ISA_IRQ) & zeus_irq_enabled_mask;
} }
static void zeus_irq_handler(unsigned int __irq, struct irq_desc *desc) static void zeus_irq_handler(struct irq_desc *desc)
{ {
unsigned int irq; unsigned int irq;
unsigned long pending; unsigned long pending;
......
...@@ -551,8 +551,7 @@ static void ecard_check_lockup(struct irq_desc *desc) ...@@ -551,8 +551,7 @@ static void ecard_check_lockup(struct irq_desc *desc)
} }
} }
static void static void ecard_irq_handler(struct irq_desc *desc)
ecard_irq_handler(unsigned int irq, struct irq_desc *desc)
{ {
ecard_t *ec; ecard_t *ec;
int called = 0; int called = 0;
......
...@@ -100,9 +100,7 @@ static struct irq_chip bast_pc104_chip = { ...@@ -100,9 +100,7 @@ static struct irq_chip bast_pc104_chip = {
.irq_ack = bast_pc104_maskack .irq_ack = bast_pc104_maskack
}; };
static void static void bast_irq_pc104_demux(struct irq_desc *desc)
bast_irq_pc104_demux(unsigned int irq,
struct irq_desc *desc)
{ {
unsigned int stat; unsigned int stat;
unsigned int irqno; unsigned int irqno;
......
...@@ -388,22 +388,22 @@ static inline void s3c_irq_demux_eint(unsigned int start, unsigned int end) ...@@ -388,22 +388,22 @@ static inline void s3c_irq_demux_eint(unsigned int start, unsigned int end)
} }
} }
static void s3c_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc) static void s3c_irq_demux_eint0_3(struct irq_desc *desc)
{ {
s3c_irq_demux_eint(0, 3); s3c_irq_demux_eint(0, 3);
} }
static void s3c_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc) static void s3c_irq_demux_eint4_11(struct irq_desc *desc)
{ {
s3c_irq_demux_eint(4, 11); s3c_irq_demux_eint(4, 11);
} }
static void s3c_irq_demux_eint12_19(unsigned int irq, struct irq_desc *desc) static void s3c_irq_demux_eint12_19(struct irq_desc *desc)
{ {
s3c_irq_demux_eint(12, 19); s3c_irq_demux_eint(12, 19);
} }
static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc) static void s3c_irq_demux_eint20_27(struct irq_desc *desc)
{ {
s3c_irq_demux_eint(20, 27); s3c_irq_demux_eint(20, 27);
} }
......
...@@ -166,7 +166,7 @@ static struct sa1100_port_fns neponset_port_fns = { ...@@ -166,7 +166,7 @@ static struct sa1100_port_fns neponset_port_fns = {
* ensure that the IRQ signal is deasserted before returning. This * ensure that the IRQ signal is deasserted before returning. This
* is rather unfortunate. * is rather unfortunate.
*/ */
static void neponset_irq_handler(unsigned int irq, struct irq_desc *desc) static void neponset_irq_handler(struct irq_desc *desc)
{ {
struct neponset_drvdata *d = irq_desc_get_handler_data(desc); struct neponset_drvdata *d = irq_desc_get_handler_data(desc);
unsigned int irr; unsigned int irr;
......
...@@ -407,7 +407,7 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type) ...@@ -407,7 +407,7 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
return 0; return 0;
} }
static void gpio_irq_handler(unsigned __irq, struct irq_desc *desc) static void gpio_irq_handler(struct irq_desc *desc)
{ {
struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc); struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc);
u32 cause, type; u32 cause, type;
......
...@@ -144,7 +144,7 @@ static struct irq_chip eic_chip = { ...@@ -144,7 +144,7 @@ static struct irq_chip eic_chip = {
.irq_set_type = eic_set_irq_type, .irq_set_type = eic_set_irq_type,
}; };
static void demux_eic_irq(unsigned int irq, struct irq_desc *desc) static void demux_eic_irq(struct irq_desc *desc)
{ {
struct eic *eic = irq_desc_get_handler_data(desc); struct eic *eic = irq_desc_get_handler_data(desc);
unsigned long status, pending; unsigned long status, pending;
......
...@@ -281,7 +281,7 @@ static struct irq_chip gpio_irqchip = { ...@@ -281,7 +281,7 @@ static struct irq_chip gpio_irqchip = {
.irq_set_type = gpio_irq_type, .irq_set_type = gpio_irq_type,
}; };
static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) static void gpio_irq_handler(struct irq_desc *desc)
{ {
struct pio_device *pio = irq_desc_get_chip_data(desc); struct pio_device *pio = irq_desc_get_chip_data(desc);
unsigned gpio_irq; unsigned gpio_irq;
......
...@@ -60,7 +60,7 @@ extern void bfin_internal_mask_irq(unsigned int irq); ...@@ -60,7 +60,7 @@ extern void bfin_internal_mask_irq(unsigned int irq);
extern void bfin_internal_unmask_irq(unsigned int irq); extern void bfin_internal_unmask_irq(unsigned int irq);
struct irq_desc; struct irq_desc;
extern void bfin_demux_mac_status_irq(unsigned int, struct irq_desc *); extern void bfin_demux_mac_status_irq(struct irq_desc *);
extern void bfin_demux_gpio_irq(unsigned int, struct irq_desc *); extern void bfin_demux_gpio_irq(struct irq_desc *);
#endif #endif
...@@ -107,7 +107,7 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) ...@@ -107,7 +107,7 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
* than crashing, do something sensible. * than crashing, do something sensible.
*/ */
if (irq >= NR_IRQS) if (irq >= NR_IRQS)
handle_bad_irq(irq, &bad_irq_desc); handle_bad_irq(&bad_irq_desc);
else else
generic_handle_irq(irq); generic_handle_irq(irq);
......
...@@ -89,8 +89,7 @@ static struct irq_chip bf537_generic_error_irqchip = { ...@@ -89,8 +89,7 @@ static struct irq_chip bf537_generic_error_irqchip = {
.irq_unmask = bf537_generic_error_unmask_irq,