From c7bec5aba52392aa8d675b8722735caf4a8b7265 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 6 Oct 2006 15:00:58 -0400 Subject: 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 --- drivers/char/rio/func.h | 2 +- drivers/char/rio/rio_linux.c | 4 ++-- drivers/char/rio/riointr.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/char/rio') 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); /* riointr.c */ void RIOTxEnable(char *); -void RIOServiceHost(struct rio_info *, struct Host *, int); +void RIOServiceHost(struct rio_info *, struct Host *); int riotproc(struct rio_info *, struct ttystatics *, int, int); /* 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) struct Host *HostP; func_enter(); - HostP = (struct Host *) ptr; /* &p->RIOHosts[(long)ptr]; */ + HostP = ptr; /* &p->RIOHosts[(long)ptr]; */ rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec); /* 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) return IRQ_HANDLED; } - RIOServiceHost(p, HostP, irq); + RIOServiceHost(p, HostP); rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type); 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; static int RxIntr; static int TxIntr; -void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) +void RIOServiceHost(struct rio_info *p, struct Host *HostP) { rio_spin_lock(&HostP->HostLock); if ((HostP->Flags & RUN_STATE) != RC_RUNNING) { -- cgit v1.2.1