From e19166d5df10be0ea404c4e346cf6be93bfb1d63 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 18 Apr 2008 19:22:52 -0400 Subject: [SCSI] aha152x, eata, u14-34f: minor irq handler cleanups - remove pointless casts from void* - remove needless references to 'irq' function argument, when that information is already stored somewhere in a driver-private struct. - where the 'irq' function argument is known never to be used, rename it to 'dummy' to make this more obvious - remove always-false tests for dev_id==NULL - remove always-true tests for 'irq == host_struct->irq' - replace per-irq lookup functions and tables with a direct reference to data object obtained via 'dev_id' function argument, passed from request_irq() This change's main purpose is to prepare for the patchset in jgarzik/misc-2.6.git#irq-remove, that explores removal of the never-used 'irq' argument in each interrupt handler. Signed-off-by: Jeff Garzik Signed-off-by: James Bottomley --- drivers/scsi/u14-34f.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/scsi/u14-34f.c') diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index 58d7eee4fe8..640333b1e75 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c @@ -1715,13 +1715,12 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec, unsigned in } -static irqreturn_t ihdlr(int irq, unsigned int j) { +static irqreturn_t ihdlr(unsigned int j) +{ struct scsi_cmnd *SCpnt; unsigned int i, k, c, status, tstatus, reg, ret; struct mscp *spp, *cpp; - - if (sh[j]->irq != irq) - panic("%s: ihdlr, irq %d, sh[j]->irq %d.\n", BN(j), irq, sh[j]->irq); + int irq = sh[j]->irq; /* Check if this board need to be serviced */ if (!((reg = inb(sh[j]->io_port + REG_SYS_INTR)) & IRQ_ASSERTED)) goto none; @@ -1935,7 +1934,7 @@ static irqreturn_t do_interrupt_handler(int irq, void *shap) { if ((j = (unsigned int)((char *)shap - sha)) >= num_boards) return IRQ_NONE; spin_lock_irqsave(sh[j]->host_lock, spin_flags); - ret = ihdlr(irq, j); + ret = ihdlr(j); spin_unlock_irqrestore(sh[j]->host_lock, spin_flags); return ret; } -- cgit v1.2.3