summaryrefslogtreecommitdiffstats
path: root/drivers/net/e2100.c
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2009-02-14 11:12:10 +0000
committerDavid S. Miller <davem@davemloft.net>2009-02-17 17:21:08 -0800
commitf11bf7a31e9a3dccf893e0fceeb1d7d9fd4dfcb4 (patch)
tree7af989aef3b69410222288286566248da080fabc /drivers/net/e2100.c
parent1256f7394cc08c60d4502a2f08d7260f3fd97d56 (diff)
downloadlinux-f11bf7a31e9a3dccf893e0fceeb1d7d9fd4dfcb4.tar.bz2
drivers/net/e2100.c: fix sparse warning: symbol shadows an earlier one
Impact: Remove redundant inner scope variable and while being at it make use of ARRAY_SIZE instead of a hardcoded number. Fix this sparse warning: drivers/net/e2100.c:219:56: warning: symbol 'i' shadows an earlier one drivers/net/e2100.c:181:13: originally declared here Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e2100.c')
-rw-r--r--drivers/net/e2100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c
index b07ba1924de0..d2f6ee1a6290 100644
--- a/drivers/net/e2100.c
+++ b/drivers/net/e2100.c
@@ -216,13 +216,13 @@ static int __init e21_probe1(struct net_device *dev, int ioaddr)
printk(" %02X", station_addr[i]);
if (dev->irq < 2) {
- int irqlist[] = {15,11,10,12,5,9,3,4}, i;
- for (i = 0; i < 8; i++)
+ int irqlist[] = {15, 11, 10, 12, 5, 9, 3, 4};
+ for (i = 0; i < ARRAY_SIZE(irqlist); i++)
if (request_irq (irqlist[i], NULL, 0, "bogus", NULL) != -EBUSY) {
dev->irq = irqlist[i];
break;
}
- if (i >= 8) {
+ if (i >= ARRAY_SIZE(irqlist)) {
printk(" unable to get IRQ %d.\n", dev->irq);
retval = -EAGAIN;
goto out;