summaryrefslogtreecommitdiff
path: root/drivers/net/natsemi.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-05 17:19:47 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:55:27 -0700
commitddfce6bb43c6bf1c9956e7a65ce1b2e19a156bd2 (patch)
tree38e871422ccb6168ae84ca6e33e9374715c3df9b /drivers/net/natsemi.c
parent43b7c451a03fe5f615710e26e8e2a3dd70eaa5b1 (diff)
downloadlinux-3.10-ddfce6bb43c6bf1c9956e7a65ce1b2e19a156bd2.tar.gz
linux-3.10-ddfce6bb43c6bf1c9956e7a65ce1b2e19a156bd2.tar.bz2
linux-3.10-ddfce6bb43c6bf1c9956e7a65ce1b2e19a156bd2.zip
network drivers: sparse warning fixes
Fix some of the easy warnings in network device drivers. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/natsemi.c')
-rw-r--r--drivers/net/natsemi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index ea38da6d31f..322d1697400 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -1615,7 +1615,7 @@ static void do_cable_magic(struct net_device *dev)
* (these values all come from National)
*/
if (!(data & 0x80) || ((data >= 0xd8) && (data <= 0xff))) {
- struct netdev_private *np = netdev_priv(dev);
+ np = netdev_priv(dev);
/* the bug has been triggered - fix the coefficient */
writew(TSTDAT_FIXED, ioaddr + TSTDAT);
@@ -2502,8 +2502,8 @@ static void __set_rx_mode(struct net_device *dev)
memset(mc_filter, 0, sizeof(mc_filter));
for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
i++, mclist = mclist->next) {
- int i = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 23) & 0x1ff;
- mc_filter[i/8] |= (1 << (i & 0x07));
+ int b = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 23) & 0x1ff;
+ mc_filter[b/8] |= (1 << (b & 0x07));
}
rx_mode = RxFilterEnable | AcceptBroadcast
| AcceptMulticast | AcceptMyPhys;