diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-06 15:00:58 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-10-06 15:00:58 -0400 |
commit | c7bec5aba52392aa8d675b8722735caf4a8b7265 (patch) | |
tree | 8087cfd2866e63fba25e18ba1fa0f374c27be4f0 /drivers | |
parent | c31f28e778ab299a5035ea2bda64f245b8915d7c (diff) |
Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void*
- Eliminate checks for conditions that never occur. These typically
fall into two classes:
1) Checking for 'dev_id == NULL', then it is never called with
NULL as an argument.
2) Checking for invalid irq number, when the only caller (the
system) guarantees the irq handler is called with the proper
'irq' number argument.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/ambassador.c | 7 | ||||
-rw-r--r-- | drivers/atm/horizon.c | 9 | ||||
-rw-r--r-- | drivers/atm/lanai.c | 4 | ||||
-rw-r--r-- | drivers/block/DAC960.c | 14 | ||||
-rw-r--r-- | drivers/cdrom/mcdx.c | 4 | ||||
-rw-r--r-- | drivers/char/rio/func.h | 2 | ||||
-rw-r--r-- | drivers/char/rio/rio_linux.c | 4 | ||||
-rw-r--r-- | drivers/char/rio/riointr.c | 2 | ||||
-rw-r--r-- | drivers/char/riscom8.c | 7 | ||||
-rw-r--r-- | drivers/char/specialix.c | 2 | ||||
-rw-r--r-- | drivers/media/video/zoran_device.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/at91_cf.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/hd64465_ss.c | 7 | ||||
-rw-r--r-- | drivers/scsi/NCR53c406a.c | 8 | ||||
-rw-r--r-- | drivers/scsi/aha152x.c | 7 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx_old.c | 12 | ||||
-rw-r--r-- | drivers/scsi/dc395x.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qlogicfas408.c | 6 | ||||
-rw-r--r-- | drivers/scsi/tmscsim.c | 8 | ||||
-rw-r--r-- | drivers/scsi/ultrastor.c | 8 | ||||
-rw-r--r-- | drivers/serial/68360serial.c | 2 | ||||
-rw-r--r-- | drivers/serial/jsm/jsm_neo.c | 2 | ||||
-rw-r--r-- | drivers/serial/mpc52xx_uart.c | 10 | ||||
-rw-r--r-- | drivers/serial/netx-serial.c | 2 | ||||
-rw-r--r-- | drivers/serial/pxa.c | 2 | ||||
-rw-r--r-- | drivers/sn/ioc3.c | 2 | ||||
-rw-r--r-- | drivers/spi/pxa2xx_spi.c | 2 |
27 files changed, 52 insertions, 87 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 8ff5c4e50823..323592de047b 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -862,15 +862,10 @@ static inline void interrupts_off (amb_dev * dev) { | |||
862 | /********** interrupt handling **********/ | 862 | /********** interrupt handling **********/ |
863 | 863 | ||
864 | static irqreturn_t interrupt_handler(int irq, void *dev_id) { | 864 | static irqreturn_t interrupt_handler(int irq, void *dev_id) { |
865 | amb_dev * dev = (amb_dev *) dev_id; | 865 | amb_dev * dev = dev_id; |
866 | 866 | ||
867 | PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id); | 867 | PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id); |
868 | 868 | ||
869 | if (!dev_id) { | ||
870 | PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); | ||
871 | return IRQ_NONE; | ||
872 | } | ||
873 | |||
874 | { | 869 | { |
875 | u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt)); | 870 | u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt)); |
876 | 871 | ||
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 33e9ee47392b..f59349206dd2 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -1389,15 +1389,6 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) { | |||
1389 | 1389 | ||
1390 | PRINTD (DBG_FLOW, "interrupt_handler: %p", dev_id); | 1390 | PRINTD (DBG_FLOW, "interrupt_handler: %p", dev_id); |
1391 | 1391 | ||
1392 | if (!dev_id) { | ||
1393 | PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); | ||
1394 | return IRQ_NONE; | ||
1395 | } | ||
1396 | if (irq != dev->irq) { | ||
1397 | PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq); | ||
1398 | return IRQ_NONE; | ||
1399 | } | ||
1400 | |||
1401 | // definitely for us | 1392 | // definitely for us |
1402 | irq_ok = 0; | 1393 | irq_ok = 0; |
1403 | while ((int_source = rd_regl (dev, INT_SOURCE_REG_OFF) | 1394 | while ((int_source = rd_regl (dev, INT_SOURCE_REG_OFF) |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 8895f026bea7..267825501dfe 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -1892,11 +1892,9 @@ static inline void lanai_int_1(struct lanai_dev *lanai, u32 reason) | |||
1892 | 1892 | ||
1893 | static irqreturn_t lanai_int(int irq, void *devid) | 1893 | static irqreturn_t lanai_int(int irq, void *devid) |
1894 | { | 1894 | { |
1895 | struct lanai_dev *lanai = (struct lanai_dev *) devid; | 1895 | struct lanai_dev *lanai = devid; |
1896 | u32 reason; | 1896 | u32 reason; |
1897 | 1897 | ||
1898 | (void) irq; /* unused variables */ | ||
1899 | |||
1900 | #ifdef USE_POWERDOWN | 1898 | #ifdef USE_POWERDOWN |
1901 | /* | 1899 | /* |
1902 | * If we're powered down we shouldn't be generating any interrupts - | 1900 | * If we're powered down we shouldn't be generating any interrupts - |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 3e8ab84b9447..742d07403101 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -5254,7 +5254,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command) | |||
5254 | static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel, | 5254 | static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel, |
5255 | void *DeviceIdentifier) | 5255 | void *DeviceIdentifier) |
5256 | { | 5256 | { |
5257 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5257 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5258 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5258 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5259 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; | 5259 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; |
5260 | unsigned long flags; | 5260 | unsigned long flags; |
@@ -5295,7 +5295,7 @@ static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel, | |||
5295 | static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel, | 5295 | static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel, |
5296 | void *DeviceIdentifier) | 5296 | void *DeviceIdentifier) |
5297 | { | 5297 | { |
5298 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5298 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5299 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5299 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5300 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; | 5300 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; |
5301 | unsigned long flags; | 5301 | unsigned long flags; |
@@ -5337,7 +5337,7 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel, | |||
5337 | static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel, | 5337 | static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel, |
5338 | void *DeviceIdentifier) | 5338 | void *DeviceIdentifier) |
5339 | { | 5339 | { |
5340 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5340 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5341 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5341 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5342 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; | 5342 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; |
5343 | unsigned long flags; | 5343 | unsigned long flags; |
@@ -5379,7 +5379,7 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel, | |||
5379 | static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel, | 5379 | static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel, |
5380 | void *DeviceIdentifier) | 5380 | void *DeviceIdentifier) |
5381 | { | 5381 | { |
5382 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5382 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5383 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5383 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5384 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; | 5384 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; |
5385 | unsigned long flags; | 5385 | unsigned long flags; |
@@ -5417,7 +5417,7 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel, | |||
5417 | static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel, | 5417 | static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel, |
5418 | void *DeviceIdentifier) | 5418 | void *DeviceIdentifier) |
5419 | { | 5419 | { |
5420 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5420 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5421 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5421 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5422 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; | 5422 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; |
5423 | unsigned long flags; | 5423 | unsigned long flags; |
@@ -5455,7 +5455,7 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel, | |||
5455 | static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel, | 5455 | static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel, |
5456 | void *DeviceIdentifier) | 5456 | void *DeviceIdentifier) |
5457 | { | 5457 | { |
5458 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5458 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5459 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5459 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5460 | unsigned long flags; | 5460 | unsigned long flags; |
5461 | 5461 | ||
@@ -5493,7 +5493,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel, | |||
5493 | static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel, | 5493 | static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel, |
5494 | void *DeviceIdentifier) | 5494 | void *DeviceIdentifier) |
5495 | { | 5495 | { |
5496 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5496 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5497 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5497 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5498 | unsigned long flags; | 5498 | unsigned long flags; |
5499 | 5499 | ||
diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index 60e1978ec0ea..f574962f4288 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c | |||
@@ -850,10 +850,6 @@ static irqreturn_t mcdx_intr(int irq, void *dev_id) | |||
850 | struct s_drive_stuff *stuffp = dev_id; | 850 | struct s_drive_stuff *stuffp = dev_id; |
851 | unsigned char b; | 851 | unsigned char b; |
852 | 852 | ||
853 | if (stuffp == NULL) { | ||
854 | xwarn("mcdx: no device for intr %d\n", irq); | ||
855 | return IRQ_NONE; | ||
856 | } | ||
857 | #ifdef AK2 | 853 | #ifdef AK2 |
858 | if (!stuffp->busy && stuffp->pending) | 854 | if (!stuffp->busy && stuffp->pending) |
859 | stuffp->int_err = 1; | 855 | stuffp->int_err = 1; |
diff --git a/drivers/char/rio/func.h b/drivers/char/rio/func.h index 6b039186856d..9e7283bd81a0 100644 --- a/drivers/char/rio/func.h +++ b/drivers/char/rio/func.h | |||
@@ -88,7 +88,7 @@ void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int); | |||
88 | 88 | ||
89 | /* riointr.c */ | 89 | /* riointr.c */ |
90 | void RIOTxEnable(char *); | 90 | void RIOTxEnable(char *); |
91 | void RIOServiceHost(struct rio_info *, struct Host *, int); | 91 | void RIOServiceHost(struct rio_info *, struct Host *); |
92 | int riotproc(struct rio_info *, struct ttystatics *, int, int); | 92 | int riotproc(struct rio_info *, struct ttystatics *, int, int); |
93 | 93 | ||
94 | /* rioparam.c */ | 94 | /* rioparam.c */ |
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 3bea594600d4..c382df0f82f6 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c | |||
@@ -368,7 +368,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr) | |||
368 | struct Host *HostP; | 368 | struct Host *HostP; |
369 | func_enter(); | 369 | func_enter(); |
370 | 370 | ||
371 | HostP = (struct Host *) ptr; /* &p->RIOHosts[(long)ptr]; */ | 371 | HostP = ptr; /* &p->RIOHosts[(long)ptr]; */ |
372 | rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec); | 372 | rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec); |
373 | 373 | ||
374 | /* AAargh! The order in which to do these things is essential and | 374 | /* AAargh! The order in which to do these things is essential and |
@@ -402,7 +402,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr) | |||
402 | return IRQ_HANDLED; | 402 | return IRQ_HANDLED; |
403 | } | 403 | } |
404 | 404 | ||
405 | RIOServiceHost(p, HostP, irq); | 405 | RIOServiceHost(p, HostP); |
406 | 406 | ||
407 | rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type); | 407 | rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type); |
408 | 408 | ||
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c index 0bd09040a5c0..eeda40c5e189 100644 --- a/drivers/char/rio/riointr.c +++ b/drivers/char/rio/riointr.c | |||
@@ -181,7 +181,7 @@ static int RupIntr; | |||
181 | static int RxIntr; | 181 | static int RxIntr; |
182 | static int TxIntr; | 182 | static int TxIntr; |
183 | 183 | ||
184 | void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) | 184 | void RIOServiceHost(struct rio_info *p, struct Host *HostP) |
185 | { | 185 | { |
186 | rio_spin_lock(&HostP->HostLock); | 186 | rio_spin_lock(&HostP->HostLock); |
187 | if ((HostP->Flags & RUN_STATE) != RC_RUNNING) { | 187 | if ((HostP->Flags & RUN_STATE) != RC_RUNNING) { |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index be68cfb0ae69..5ab32b38f45a 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -559,11 +559,10 @@ static irqreturn_t rc_interrupt(int irq, void * dev_id) | |||
559 | int handled = 0; | 559 | int handled = 0; |
560 | 560 | ||
561 | bp = IRQ_to_board[irq]; | 561 | bp = IRQ_to_board[irq]; |
562 | 562 | ||
563 | if (!bp || !(bp->flags & RC_BOARD_ACTIVE)) { | 563 | if (!(bp->flags & RC_BOARD_ACTIVE)) |
564 | return IRQ_NONE; | 564 | return IRQ_NONE; |
565 | } | 565 | |
566 | |||
567 | while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) & | 566 | while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) & |
568 | (RC_BSR_TOUT | RC_BSR_TINT | | 567 | (RC_BSR_TOUT | RC_BSR_TINT | |
569 | RC_BSR_MINT | RC_BSR_RINT))) { | 568 | RC_BSR_MINT | RC_BSR_RINT))) { |
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 6022495571ae..d0b88d0e87fd 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -912,7 +912,7 @@ static irqreturn_t sx_interrupt(int irq, void *dev_id) | |||
912 | spin_lock_irqsave(&bp->lock, flags); | 912 | spin_lock_irqsave(&bp->lock, flags); |
913 | 913 | ||
914 | dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); | 914 | dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); |
915 | if (!bp || !(bp->flags & SX_BOARD_ACTIVE)) { | 915 | if (!(bp->flags & SX_BOARD_ACTIVE)) { |
916 | dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq); | 916 | dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq); |
917 | spin_unlock_irqrestore(&bp->lock, flags); | 917 | spin_unlock_irqrestore(&bp->lock, flags); |
918 | func_exit(); | 918 | func_exit(); |
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c index d9d5020a2224..168e431d7c71 100644 --- a/drivers/media/video/zoran_device.c +++ b/drivers/media/video/zoran_device.c | |||
@@ -1415,7 +1415,7 @@ zoran_irq (int irq, | |||
1415 | struct zoran *zr; | 1415 | struct zoran *zr; |
1416 | unsigned long flags; | 1416 | unsigned long flags; |
1417 | 1417 | ||
1418 | zr = (struct zoran *) dev_id; | 1418 | zr = dev_id; |
1419 | count = 0; | 1419 | count = 0; |
1420 | 1420 | ||
1421 | if (zr->testing) { | 1421 | if (zr->testing) { |
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 991e084db2d6..7f5df9a9f393 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -66,7 +66,7 @@ static int at91_cf_ss_init(struct pcmcia_socket *s) | |||
66 | 66 | ||
67 | static irqreturn_t at91_cf_irq(int irq, void *_cf) | 67 | static irqreturn_t at91_cf_irq(int irq, void *_cf) |
68 | { | 68 | { |
69 | struct at91_cf_socket *cf = (struct at91_cf_socket *) _cf; | 69 | struct at91_cf_socket *cf = _cf; |
70 | 70 | ||
71 | if (irq == cf->board->det_pin) { | 71 | if (irq == cf->board->det_pin) { |
72 | unsigned present = at91_cf_present(cf); | 72 | unsigned present = at91_cf_present(cf); |
diff --git a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c index db3c26b5de14..caca0dc9d30f 100644 --- a/drivers/pcmcia/hd64465_ss.c +++ b/drivers/pcmcia/hd64465_ss.c | |||
@@ -650,7 +650,7 @@ static int hs_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *mem) | |||
650 | */ | 650 | */ |
651 | static int hs_irq_demux(int irq, void *dev) | 651 | static int hs_irq_demux(int irq, void *dev) |
652 | { | 652 | { |
653 | hs_socket_t *sp = (hs_socket_t *)dev; | 653 | hs_socket_t *sp = dev; |
654 | u_int cscr; | 654 | u_int cscr; |
655 | 655 | ||
656 | DPRINTK("hs_irq_demux(irq=%d)\n", irq); | 656 | DPRINTK("hs_irq_demux(irq=%d)\n", irq); |
@@ -673,11 +673,10 @@ static int hs_irq_demux(int irq, void *dev) | |||
673 | 673 | ||
674 | static irqreturn_t hs_interrupt(int irq, void *dev) | 674 | static irqreturn_t hs_interrupt(int irq, void *dev) |
675 | { | 675 | { |
676 | hs_socket_t *sp = (hs_socket_t *)dev; | 676 | hs_socket_t *sp = dev; |
677 | u_int events = 0; | 677 | u_int events = 0; |
678 | u_int cscr; | 678 | u_int cscr; |
679 | 679 | ||
680 | |||
681 | cscr = hs_in(sp, CSCR); | 680 | cscr = hs_in(sp, CSCR); |
682 | 681 | ||
683 | DPRINTK("hs_interrupt, cscr=%04x\n", cscr); | 682 | DPRINTK("hs_interrupt, cscr=%04x\n", cscr); |
diff --git a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c index 3896278594c7..d4613815f685 100644 --- a/drivers/scsi/NCR53c406a.c +++ b/drivers/scsi/NCR53c406a.c | |||
@@ -168,7 +168,7 @@ enum Phase { | |||
168 | }; | 168 | }; |
169 | 169 | ||
170 | /* Static function prototypes */ | 170 | /* Static function prototypes */ |
171 | static void NCR53c406a_intr(int, void *); | 171 | static void NCR53c406a_intr(void *); |
172 | static irqreturn_t do_NCR53c406a_intr(int, void *); | 172 | static irqreturn_t do_NCR53c406a_intr(int, void *); |
173 | static void chip_init(void); | 173 | static void chip_init(void); |
174 | static void calc_port_addr(void); | 174 | static void calc_port_addr(void); |
@@ -685,7 +685,7 @@ static void wait_intr(void) | |||
685 | return; | 685 | return; |
686 | } | 686 | } |
687 | 687 | ||
688 | NCR53c406a_intr(0, NULL, NULL); | 688 | NCR53c406a_intr(NULL); |
689 | } | 689 | } |
690 | #endif | 690 | #endif |
691 | 691 | ||
@@ -767,12 +767,12 @@ static irqreturn_t do_NCR53c406a_intr(int unused, void *dev_id) | |||
767 | struct Scsi_Host *dev = dev_id; | 767 | struct Scsi_Host *dev = dev_id; |
768 | 768 | ||
769 | spin_lock_irqsave(dev->host_lock, flags); | 769 | spin_lock_irqsave(dev->host_lock, flags); |
770 | NCR53c406a_intr(0, dev_id); | 770 | NCR53c406a_intr(dev_id); |
771 | spin_unlock_irqrestore(dev->host_lock, flags); | 771 | spin_unlock_irqrestore(dev->host_lock, flags); |
772 | return IRQ_HANDLED; | 772 | return IRQ_HANDLED; |
773 | } | 773 | } |
774 | 774 | ||
775 | static void NCR53c406a_intr(int unused, void *dev_id) | 775 | static void NCR53c406a_intr(void *dev_id) |
776 | { | 776 | { |
777 | DEB(unsigned char fifo_size; | 777 | DEB(unsigned char fifo_size; |
778 | ) | 778 | ) |
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index e04c2bc1932b..a0d1cee0be77 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -759,12 +759,7 @@ static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, Scsi_Cmnd *SCp) | |||
759 | 759 | ||
760 | static irqreturn_t swintr(int irqno, void *dev_id) | 760 | static irqreturn_t swintr(int irqno, void *dev_id) |
761 | { | 761 | { |
762 | struct Scsi_Host *shpnt = (struct Scsi_Host *)dev_id; | 762 | struct Scsi_Host *shpnt = dev_id; |
763 | |||
764 | if (!shpnt) { | ||
765 | printk(KERN_ERR "aha152x: catched software interrupt %d for unknown controller.\n", irqno); | ||
766 | return IRQ_NONE; | ||
767 | } | ||
768 | 763 | ||
769 | HOSTDATA(shpnt)->swint++; | 764 | HOSTDATA(shpnt)->swint++; |
770 | 765 | ||
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 7f0adf9c4c7e..bcd7fffab907 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c | |||
@@ -6345,12 +6345,12 @@ aic7xxx_handle_command_completion_intr(struct aic7xxx_host *p) | |||
6345 | * SCSI controller interrupt handler. | 6345 | * SCSI controller interrupt handler. |
6346 | *-F*************************************************************************/ | 6346 | *-F*************************************************************************/ |
6347 | static void | 6347 | static void |
6348 | aic7xxx_isr(int irq, void *dev_id) | 6348 | aic7xxx_isr(void *dev_id) |
6349 | { | 6349 | { |
6350 | struct aic7xxx_host *p; | 6350 | struct aic7xxx_host *p; |
6351 | unsigned char intstat; | 6351 | unsigned char intstat; |
6352 | 6352 | ||
6353 | p = (struct aic7xxx_host *)dev_id; | 6353 | p = dev_id; |
6354 | 6354 | ||
6355 | /* | 6355 | /* |
6356 | * Just a few sanity checks. Make sure that we have an int pending. | 6356 | * Just a few sanity checks. Make sure that we have an int pending. |
@@ -6489,7 +6489,7 @@ do_aic7xxx_isr(int irq, void *dev_id) | |||
6489 | p->flags |= AHC_IN_ISR; | 6489 | p->flags |= AHC_IN_ISR; |
6490 | do | 6490 | do |
6491 | { | 6491 | { |
6492 | aic7xxx_isr(irq, dev_id); | 6492 | aic7xxx_isr(dev_id); |
6493 | } while ( (aic_inb(p, INTSTAT) & INT_PEND) ); | 6493 | } while ( (aic_inb(p, INTSTAT) & INT_PEND) ); |
6494 | aic7xxx_done_cmds_complete(p); | 6494 | aic7xxx_done_cmds_complete(p); |
6495 | aic7xxx_run_waiting_queues(p); | 6495 | aic7xxx_run_waiting_queues(p); |
@@ -10377,7 +10377,7 @@ static int __aic7xxx_bus_device_reset(struct scsi_cmnd *cmd) | |||
10377 | 10377 | ||
10378 | hscb = scb->hscb; | 10378 | hscb = scb->hscb; |
10379 | 10379 | ||
10380 | aic7xxx_isr(p->irq, (void *)p); | 10380 | aic7xxx_isr(p); |
10381 | aic7xxx_done_cmds_complete(p); | 10381 | aic7xxx_done_cmds_complete(p); |
10382 | /* If the command was already complete or just completed, then we didn't | 10382 | /* If the command was already complete or just completed, then we didn't |
10383 | * do a reset, return FAILED */ | 10383 | * do a reset, return FAILED */ |
@@ -10608,7 +10608,7 @@ static int __aic7xxx_abort(struct scsi_cmnd *cmd) | |||
10608 | else | 10608 | else |
10609 | return FAILED; | 10609 | return FAILED; |
10610 | 10610 | ||
10611 | aic7xxx_isr(p->irq, (void *)p); | 10611 | aic7xxx_isr(p); |
10612 | aic7xxx_done_cmds_complete(p); | 10612 | aic7xxx_done_cmds_complete(p); |
10613 | /* If the command was already complete or just completed, then we didn't | 10613 | /* If the command was already complete or just completed, then we didn't |
10614 | * do a reset, return FAILED */ | 10614 | * do a reset, return FAILED */ |
@@ -10863,7 +10863,7 @@ static int aic7xxx_reset(struct scsi_cmnd *cmd) | |||
10863 | 10863 | ||
10864 | while((aic_inb(p, INTSTAT) & INT_PEND) && !(p->flags & AHC_IN_ISR)) | 10864 | while((aic_inb(p, INTSTAT) & INT_PEND) && !(p->flags & AHC_IN_ISR)) |
10865 | { | 10865 | { |
10866 | aic7xxx_isr(p->irq, p); | 10866 | aic7xxx_isr(p); |
10867 | pause_sequencer(p); | 10867 | pause_sequencer(p); |
10868 | } | 10868 | } |
10869 | aic7xxx_done_cmds_complete(p); | 10869 | aic7xxx_done_cmds_complete(p); |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 81e3ee51d897..23f5e418ab55 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -1815,7 +1815,7 @@ static void dc395x_handle_interrupt(struct AdapterCtlBlk *acb, | |||
1815 | 1815 | ||
1816 | static irqreturn_t dc395x_interrupt(int irq, void *dev_id) | 1816 | static irqreturn_t dc395x_interrupt(int irq, void *dev_id) |
1817 | { | 1817 | { |
1818 | struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)dev_id; | 1818 | struct AdapterCtlBlk *acb = dev_id; |
1819 | u16 scsi_status; | 1819 | u16 scsi_status; |
1820 | u8 dma_status; | 1820 | u8 dma_status; |
1821 | irqreturn_t handled = IRQ_NONE; | 1821 | irqreturn_t handled = IRQ_NONE; |
diff --git a/drivers/scsi/qlogicfas408.c b/drivers/scsi/qlogicfas408.c index 1a7de3bd796f..e0725353c99c 100644 --- a/drivers/scsi/qlogicfas408.c +++ b/drivers/scsi/qlogicfas408.c | |||
@@ -405,10 +405,10 @@ static unsigned int ql_pcmd(Scsi_Cmnd * cmd) | |||
405 | * Interrupt handler | 405 | * Interrupt handler |
406 | */ | 406 | */ |
407 | 407 | ||
408 | static void ql_ihandl(int irq, void *dev_id) | 408 | static void ql_ihandl(void *dev_id) |
409 | { | 409 | { |
410 | Scsi_Cmnd *icmd; | 410 | Scsi_Cmnd *icmd; |
411 | struct Scsi_Host *host = (struct Scsi_Host *)dev_id; | 411 | struct Scsi_Host *host = dev_id; |
412 | struct qlogicfas408_priv *priv = get_priv_by_host(host); | 412 | struct qlogicfas408_priv *priv = get_priv_by_host(host); |
413 | int qbase = priv->qbase; | 413 | int qbase = priv->qbase; |
414 | REG0; | 414 | REG0; |
@@ -438,7 +438,7 @@ irqreturn_t qlogicfas408_ihandl(int irq, void *dev_id) | |||
438 | struct Scsi_Host *host = dev_id; | 438 | struct Scsi_Host *host = dev_id; |
439 | 439 | ||
440 | spin_lock_irqsave(host->host_lock, flags); | 440 | spin_lock_irqsave(host->host_lock, flags); |
441 | ql_ihandl(irq, dev_id); | 441 | ql_ihandl(dev_id); |
442 | spin_unlock_irqrestore(host->host_lock, flags); | 442 | spin_unlock_irqrestore(host->host_lock, flags); |
443 | return IRQ_HANDLED; | 443 | return IRQ_HANDLED; |
444 | } | 444 | } |
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 0f0ac925d319..d03aa6ce8fe8 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -700,9 +700,9 @@ dc390_InvalidCmd(struct dc390_acb* pACB) | |||
700 | 700 | ||
701 | 701 | ||
702 | static irqreturn_t __inline__ | 702 | static irqreturn_t __inline__ |
703 | DC390_Interrupt(int irq, void *dev_id) | 703 | DC390_Interrupt(void *dev_id) |
704 | { | 704 | { |
705 | struct dc390_acb *pACB = (struct dc390_acb*)dev_id; | 705 | struct dc390_acb *pACB = dev_id; |
706 | struct dc390_dcb *pDCB; | 706 | struct dc390_dcb *pDCB; |
707 | struct dc390_srb *pSRB; | 707 | struct dc390_srb *pSRB; |
708 | u8 sstatus=0; | 708 | u8 sstatus=0; |
@@ -811,12 +811,12 @@ DC390_Interrupt(int irq, void *dev_id) | |||
811 | return IRQ_HANDLED; | 811 | return IRQ_HANDLED; |
812 | } | 812 | } |
813 | 813 | ||
814 | static irqreturn_t do_DC390_Interrupt( int irq, void *dev_id) | 814 | static irqreturn_t do_DC390_Interrupt(int irq, void *dev_id) |
815 | { | 815 | { |
816 | irqreturn_t ret; | 816 | irqreturn_t ret; |
817 | DEBUG1(printk (KERN_INFO "DC390: Irq (%i) caught: ", irq)); | 817 | DEBUG1(printk (KERN_INFO "DC390: Irq (%i) caught: ", irq)); |
818 | /* Locking is done in DC390_Interrupt */ | 818 | /* Locking is done in DC390_Interrupt */ |
819 | ret = DC390_Interrupt(irq, dev_id); | 819 | ret = DC390_Interrupt(dev_id); |
820 | DEBUG1(printk (".. IRQ returned\n")); | 820 | DEBUG1(printk (".. IRQ returned\n")); |
821 | return ret; | 821 | return ret; |
822 | } | 822 | } |
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c index 107f0fc34949..56906aba5ee3 100644 --- a/drivers/scsi/ultrastor.c +++ b/drivers/scsi/ultrastor.c | |||
@@ -287,7 +287,7 @@ static const unsigned short ultrastor_ports_14f[] = { | |||
287 | }; | 287 | }; |
288 | #endif | 288 | #endif |
289 | 289 | ||
290 | static void ultrastor_interrupt(int, void *); | 290 | static void ultrastor_interrupt(void *); |
291 | static irqreturn_t do_ultrastor_interrupt(int, void *); | 291 | static irqreturn_t do_ultrastor_interrupt(int, void *); |
292 | static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt); | 292 | static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt); |
293 | 293 | ||
@@ -893,7 +893,7 @@ static int ultrastor_abort(struct scsi_cmnd *SCpnt) | |||
893 | 893 | ||
894 | spin_lock_irqsave(host->host_lock, flags); | 894 | spin_lock_irqsave(host->host_lock, flags); |
895 | /* FIXME: Ewww... need to think about passing host around properly */ | 895 | /* FIXME: Ewww... need to think about passing host around properly */ |
896 | ultrastor_interrupt(0, NULL); | 896 | ultrastor_interrupt(NULL); |
897 | spin_unlock_irqrestore(host->host_lock, flags); | 897 | spin_unlock_irqrestore(host->host_lock, flags); |
898 | return SUCCESS; | 898 | return SUCCESS; |
899 | } | 899 | } |
@@ -1039,7 +1039,7 @@ int ultrastor_biosparam(struct scsi_device *sdev, struct block_device *bdev, | |||
1039 | return 0; | 1039 | return 0; |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | static void ultrastor_interrupt(int irq, void *dev_id) | 1042 | static void ultrastor_interrupt(void *dev_id) |
1043 | { | 1043 | { |
1044 | unsigned int status; | 1044 | unsigned int status; |
1045 | #if ULTRASTOR_MAX_CMDS > 1 | 1045 | #if ULTRASTOR_MAX_CMDS > 1 |
@@ -1177,7 +1177,7 @@ static irqreturn_t do_ultrastor_interrupt(int irq, void *dev_id) | |||
1177 | struct Scsi_Host *dev = dev_id; | 1177 | struct Scsi_Host *dev = dev_id; |
1178 | 1178 | ||
1179 | spin_lock_irqsave(dev->host_lock, flags); | 1179 | spin_lock_irqsave(dev->host_lock, flags); |
1180 | ultrastor_interrupt(irq, dev_id); | 1180 | ultrastor_interrupt(dev_id); |
1181 | spin_unlock_irqrestore(dev->host_lock, flags); | 1181 | spin_unlock_irqrestore(dev->host_lock, flags); |
1182 | return IRQ_HANDLED; | 1182 | return IRQ_HANDLED; |
1183 | } | 1183 | } |
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index 4e56ec803861..634ecca36a77 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c | |||
@@ -620,7 +620,7 @@ static void rs_360_interrupt(int vec, void *dev_id) | |||
620 | volatile struct smc_regs *smcp; | 620 | volatile struct smc_regs *smcp; |
621 | volatile struct scc_regs *sccp; | 621 | volatile struct scc_regs *sccp; |
622 | 622 | ||
623 | info = (ser_info_t *)dev_id; | 623 | info = dev_id; |
624 | 624 | ||
625 | idx = PORT_NUM(info->state->smc_scc_num); | 625 | idx = PORT_NUM(info->state->smc_scc_num); |
626 | if (info->state->smc_scc_num & NUM_IS_SCC) { | 626 | if (info->state->smc_scc_num & NUM_IS_SCC) { |
diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c index 8fa31e68989a..8be8da37f629 100644 --- a/drivers/serial/jsm/jsm_neo.c +++ b/drivers/serial/jsm/jsm_neo.c | |||
@@ -1116,7 +1116,7 @@ static void neo_param(struct jsm_channel *ch) | |||
1116 | */ | 1116 | */ |
1117 | static irqreturn_t neo_intr(int irq, void *voidbrd) | 1117 | static irqreturn_t neo_intr(int irq, void *voidbrd) |
1118 | { | 1118 | { |
1119 | struct jsm_board *brd = (struct jsm_board *) voidbrd; | 1119 | struct jsm_board *brd = voidbrd; |
1120 | struct jsm_channel *ch; | 1120 | struct jsm_channel *ch; |
1121 | int port = 0; | 1121 | int port = 0; |
1122 | int type = 0; | 1122 | int type = 0; |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 039c2fd6d496..4f80c5b4a753 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -512,19 +512,11 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port) | |||
512 | static irqreturn_t | 512 | static irqreturn_t |
513 | mpc52xx_uart_int(int irq, void *dev_id) | 513 | mpc52xx_uart_int(int irq, void *dev_id) |
514 | { | 514 | { |
515 | struct uart_port *port = (struct uart_port *) dev_id; | 515 | struct uart_port *port = dev_id; |
516 | unsigned long pass = ISR_PASS_LIMIT; | 516 | unsigned long pass = ISR_PASS_LIMIT; |
517 | unsigned int keepgoing; | 517 | unsigned int keepgoing; |
518 | unsigned short status; | 518 | unsigned short status; |
519 | 519 | ||
520 | if ( irq != port->irq ) { | ||
521 | printk( KERN_WARNING | ||
522 | "mpc52xx_uart_int : " \ | ||
523 | "Received wrong int %d. Waiting for %d\n", | ||
524 | irq, port->irq); | ||
525 | return IRQ_NONE; | ||
526 | } | ||
527 | |||
528 | spin_lock(&port->lock); | 520 | spin_lock(&port->lock); |
529 | 521 | ||
530 | /* While we have stuff to do, we continue */ | 522 | /* While we have stuff to do, we continue */ |
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c index e92d7e1c22cf..062bad457b1a 100644 --- a/drivers/serial/netx-serial.c +++ b/drivers/serial/netx-serial.c | |||
@@ -247,7 +247,7 @@ static void netx_rxint(struct uart_port *port) | |||
247 | 247 | ||
248 | static irqreturn_t netx_int(int irq, void *dev_id) | 248 | static irqreturn_t netx_int(int irq, void *dev_id) |
249 | { | 249 | { |
250 | struct uart_port *port = (struct uart_port *)dev_id; | 250 | struct uart_port *port = dev_id; |
251 | unsigned long flags; | 251 | unsigned long flags; |
252 | unsigned char status; | 252 | unsigned char status; |
253 | 253 | ||
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 846089f222d4..415fe9633a9b 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -232,7 +232,7 @@ static inline void check_modem_status(struct uart_pxa_port *up) | |||
232 | */ | 232 | */ |
233 | static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) | 233 | static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) |
234 | { | 234 | { |
235 | struct uart_pxa_port *up = (struct uart_pxa_port *)dev_id; | 235 | struct uart_pxa_port *up = dev_id; |
236 | unsigned int iir, lsr; | 236 | unsigned int iir, lsr; |
237 | 237 | ||
238 | iir = serial_in(up, UART_IIR); | 238 | iir = serial_in(up, UART_IIR); |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index 3d91b6b9287d..cd6b65333b71 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
@@ -401,7 +401,7 @@ static inline uint32_t get_pending_intrs(struct ioc3_driver_data *idd) | |||
401 | static irqreturn_t ioc3_intr_io(int irq, void *arg) | 401 | static irqreturn_t ioc3_intr_io(int irq, void *arg) |
402 | { | 402 | { |
403 | unsigned long flags; | 403 | unsigned long flags; |
404 | struct ioc3_driver_data *idd = (struct ioc3_driver_data *)arg; | 404 | struct ioc3_driver_data *idd = arg; |
405 | int handled = 1, id; | 405 | int handled = 1, id; |
406 | unsigned int pending; | 406 | unsigned int pending; |
407 | 407 | ||
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index 77122edeb206..72025df5561d 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
@@ -669,7 +669,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data) | |||
669 | 669 | ||
670 | static irqreturn_t ssp_int(int irq, void *dev_id) | 670 | static irqreturn_t ssp_int(int irq, void *dev_id) |
671 | { | 671 | { |
672 | struct driver_data *drv_data = (struct driver_data *)dev_id; | 672 | struct driver_data *drv_data = dev_id; |
673 | void *reg = drv_data->ioaddr; | 673 | void *reg = drv_data->ioaddr; |
674 | 674 | ||
675 | if (!drv_data->cur_msg) { | 675 | if (!drv_data->cur_msg) { |