summaryrefslogtreecommitdiffstats
path: root/drivers/atm
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-06 15:00:58 -0400
committerJeff Garzik <jeff@garzik.org>2006-10-06 15:00:58 -0400
commitc7bec5aba52392aa8d675b8722735caf4a8b7265 (patch)
tree8087cfd2866e63fba25e18ba1fa0f374c27be4f0 /drivers/atm
parentc31f28e778ab299a5035ea2bda64f245b8915d7c (diff)
downloadblackbird-op-linux-c7bec5aba52392aa8d675b8722735caf4a8b7265.tar.gz
blackbird-op-linux-c7bec5aba52392aa8d675b8722735caf4a8b7265.zip
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/atm')
-rw-r--r--drivers/atm/ambassador.c7
-rw-r--r--drivers/atm/horizon.c9
-rw-r--r--drivers/atm/lanai.c4
3 files changed, 2 insertions, 18 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) {
/********** interrupt handling **********/
static irqreturn_t interrupt_handler(int irq, void *dev_id) {
- amb_dev * dev = (amb_dev *) dev_id;
+ amb_dev * dev = dev_id;
PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id);
- if (!dev_id) {
- PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq);
- return IRQ_NONE;
- }
-
{
u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt));
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) {
PRINTD (DBG_FLOW, "interrupt_handler: %p", dev_id);
- if (!dev_id) {
- PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq);
- return IRQ_NONE;
- }
- if (irq != dev->irq) {
- PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq);
- return IRQ_NONE;
- }
-
// definitely for us
irq_ok = 0;
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)
static irqreturn_t lanai_int(int irq, void *devid)
{
- struct lanai_dev *lanai = (struct lanai_dev *) devid;
+ struct lanai_dev *lanai = devid;
u32 reason;
- (void) irq; /* unused variables */
-
#ifdef USE_POWERDOWN
/*
* If we're powered down we shouldn't be generating any interrupts -
OpenPOWER on IntegriCloud