Skip to content

Commit 625b86a

Browse files
committed
m68k/irq: Prepare irq handlers for irq argument removal
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: [email protected]
1 parent 88bd646 commit 625b86a

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

arch/m68k/coldfire/intc-5272.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ static int intc_irq_set_type(struct irq_data *d, unsigned int type)
143143
* We need to be careful with the masking/acking due to the side effects
144144
* of masking an interrupt.
145145
*/
146-
static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
146+
static void intc_external_irq(unsigned int __irq, struct irq_desc *desc)
147147
{
148+
unsigned int irq = irq_desc_get_irq(desc);
149+
148150
irq_desc_get_chip(desc)->irq_ack(&desc->irq_data);
149151
handle_simple_irq(irq, desc);
150152
}

arch/m68k/mac/oss.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ void __init oss_nubus_init(void)
6363
* Handle miscellaneous OSS interrupts.
6464
*/
6565

66-
static void oss_irq(unsigned int irq, struct irq_desc *desc)
66+
static void oss_irq(unsigned int __irq, struct irq_desc *desc)
6767
{
6868
int events = oss->irq_pending &
69-
(OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM);
69+
(OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM);
7070

7171
#ifdef DEBUG_IRQS
7272
if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
73+
unsigned int irq = irq_desc_get_irq(desc);
74+
7375
printk("oss_irq: irq %u events = 0x%04X\n", irq,
7476
(int) oss->irq_pending);
7577
}

arch/m68k/mac/psc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@ void __init psc_init(void)
113113
* PSC interrupt handler. It's a lot like the VIA interrupt handler.
114114
*/
115115

116-
static void psc_irq(unsigned int irq, struct irq_desc *desc)
116+
static void psc_irq(unsigned int __irq, struct irq_desc *desc)
117117
{
118118
unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
119+
unsigned int irq = irq_desc_get_irq(desc);
119120
int pIFR = pIFRbase + offset;
120121
int pIER = pIERbase + offset;
121122
int irq_num;

0 commit comments

Comments
 (0)