drivers/net/at1700.c: fix sparse warning: symbol shadows an earlier one
authorHannes Eder <hannes@hanneseder.net>
Sat, 14 Feb 2009 11:11:55 +0000 (11:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Feb 2009 01:21:07 +0000 (17:21 -0800)
Impact: Move variable declaration to a more inner scope.

Fix this sparse warning:
  drivers/net/at1700.c:846:21: warning: symbol 'i' shadows an earlier one
  drivers/net/at1700.c:831:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/at1700.c

index 72ea6e378f8dda5dec528cdad250c23cd6ce6677..ced70799b898faa6006cacf9a31cf56cff2a99c6 100644 (file)
@@ -828,7 +828,6 @@ set_rx_mode(struct net_device *dev)
        struct net_local *lp = netdev_priv(dev);
        unsigned char mc_filter[8];              /* Multicast hash filter */
        unsigned long flags;
-       int i;
 
        if (dev->flags & IFF_PROMISC) {
                memset(mc_filter, 0xff, sizeof(mc_filter));
@@ -857,6 +856,7 @@ set_rx_mode(struct net_device *dev)
 
        spin_lock_irqsave (&lp->lock, flags);
        if (memcmp(mc_filter, lp->mc_filter, sizeof(mc_filter))) {
+               int i;
                int saved_bank = inw(ioaddr + CONFIG_0);
                /* Switch to bank 1 and set the multicast table. */
                outw((saved_bank & ~0x0C00) | 0x0480, ioaddr + CONFIG_0);