diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-19 03:14:03 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-23 19:53:16 -0400 |
commit | 1daec86ad11383845274e032d1b90620258dc87d (patch) | |
tree | 01fb555646b490dd494e1d51869c6f1d51cba7e7 | |
parent | 06efcad0d43a5491602f7d7bfc1ce997cdb0d062 (diff) |
[NETDRVR] lib82596, netxen: delete pointless tests from irq handler
Remove always-false tests in irq handler.
Also a few other minor cleanups.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r-- | drivers/net/lib82596.c | 8 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 11 |
2 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/lib82596.c b/drivers/net/lib82596.c index ffaa14f2cd01..9a855e512147 100644 --- a/drivers/net/lib82596.c +++ b/drivers/net/lib82596.c | |||
@@ -1124,12 +1124,6 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id) | |||
1124 | struct i596_dma *dma; | 1124 | struct i596_dma *dma; |
1125 | unsigned short status, ack_cmd = 0; | 1125 | unsigned short status, ack_cmd = 0; |
1126 | 1126 | ||
1127 | if (dev == NULL) { | ||
1128 | printk(KERN_WARNING "%s: irq %d for unknown device.\n", | ||
1129 | __FUNCTION__, irq); | ||
1130 | return IRQ_NONE; | ||
1131 | } | ||
1132 | |||
1133 | lp = netdev_priv(dev); | 1127 | lp = netdev_priv(dev); |
1134 | dma = lp->dma; | 1128 | dma = lp->dma; |
1135 | 1129 | ||
@@ -1140,7 +1134,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id) | |||
1140 | 1134 | ||
1141 | DEB(DEB_INTS, printk(KERN_DEBUG | 1135 | DEB(DEB_INTS, printk(KERN_DEBUG |
1142 | "%s: i596 interrupt, IRQ %d, status %4.4x.\n", | 1136 | "%s: i596 interrupt, IRQ %d, status %4.4x.\n", |
1143 | dev->name, irq, status)); | 1137 | dev->name, dev->irq, status)); |
1144 | 1138 | ||
1145 | ack_cmd = status & 0xf000; | 1139 | ack_cmd = status & 0xf000; |
1146 | 1140 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 601051c584e8..a80f0cd6b528 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1268,17 +1268,10 @@ netxen_handle_int(struct netxen_adapter *adapter, struct net_device *netdev) | |||
1268 | */ | 1268 | */ |
1269 | irqreturn_t netxen_intr(int irq, void *data) | 1269 | irqreturn_t netxen_intr(int irq, void *data) |
1270 | { | 1270 | { |
1271 | struct netxen_adapter *adapter; | 1271 | struct netxen_adapter *adapter = data; |
1272 | struct net_device *netdev; | 1272 | struct net_device *netdev = adapter->netdev; |
1273 | u32 our_int = 0; | 1273 | u32 our_int = 0; |
1274 | 1274 | ||
1275 | if (unlikely(!irq)) { | ||
1276 | return IRQ_NONE; /* Not our interrupt */ | ||
1277 | } | ||
1278 | |||
1279 | adapter = (struct netxen_adapter *)data; | ||
1280 | netdev = adapter->netdev; | ||
1281 | |||
1282 | if (!(adapter->flags & NETXEN_NIC_MSI_ENABLED)) { | 1275 | if (!(adapter->flags & NETXEN_NIC_MSI_ENABLED)) { |
1283 | our_int = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_INT_VECTOR)); | 1276 | our_int = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_INT_VECTOR)); |
1284 | /* not our interrupt */ | 1277 | /* not our interrupt */ |