Skip to content

Commit

Permalink
drivers/net/at1700.c: fix sparse warning: symbol shadows an earlier one
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hannes Eder authored and David S. Miller committed Feb 18, 2009
1 parent 1c10c49 commit 1256f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/at1700.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1256f73

Please sign in to comment.