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/scsi/aic7xxx_old.c | |
parent | c31f28e778ab299a5035ea2bda64f245b8915d7c (diff) | |
download | op-kernel-dev-c7bec5aba52392aa8d675b8722735caf4a8b7265.zip op-kernel-dev-c7bec5aba52392aa8d675b8722735caf4a8b7265.tar.gz |
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/scsi/aic7xxx_old.c')
-rw-r--r-- | drivers/scsi/aic7xxx_old.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 7f0adf9..bcd7fff 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) * SCSI controller interrupt handler. *-F*************************************************************************/ static void -aic7xxx_isr(int irq, void *dev_id) +aic7xxx_isr(void *dev_id) { struct aic7xxx_host *p; unsigned char intstat; - p = (struct aic7xxx_host *)dev_id; + p = dev_id; /* * 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) p->flags |= AHC_IN_ISR; do { - aic7xxx_isr(irq, dev_id); + aic7xxx_isr(dev_id); } while ( (aic_inb(p, INTSTAT) & INT_PEND) ); aic7xxx_done_cmds_complete(p); aic7xxx_run_waiting_queues(p); @@ -10377,7 +10377,7 @@ static int __aic7xxx_bus_device_reset(struct scsi_cmnd *cmd) hscb = scb->hscb; - aic7xxx_isr(p->irq, (void *)p); + aic7xxx_isr(p); aic7xxx_done_cmds_complete(p); /* If the command was already complete or just completed, then we didn't * do a reset, return FAILED */ @@ -10608,7 +10608,7 @@ static int __aic7xxx_abort(struct scsi_cmnd *cmd) else return FAILED; - aic7xxx_isr(p->irq, (void *)p); + aic7xxx_isr(p); aic7xxx_done_cmds_complete(p); /* If the command was already complete or just completed, then we didn't * do a reset, return FAILED */ @@ -10863,7 +10863,7 @@ static int aic7xxx_reset(struct scsi_cmnd *cmd) while((aic_inb(p, INTSTAT) & INT_PEND) && !(p->flags & AHC_IN_ISR)) { - aic7xxx_isr(p->irq, p); + aic7xxx_isr(p); pause_sequencer(p); } aic7xxx_done_cmds_complete(p); |