summaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-03-26 08:29:30 +0000
committerDavid S. Miller <davem@davemloft.net>2013-03-27 00:52:06 -0400
commit5abb0029c8df0312c6095e7a336d2b80ea358e77 (patch)
treedd8fc00c1e4bc5bf5045d9aff3dea1f0f767fbd7 /drivers/net/vxlan.c
parentd4ec1b5cdd119151704e190d05e9825a598403bd (diff)
downloadtalos-obmc-linux-5abb0029c8df0312c6095e7a336d2b80ea358e77.tar.gz
talos-obmc-linux-5abb0029c8df0312c6095e7a336d2b80ea358e77.zip
VXLAN: Fix sparse warnings.
Fixes following warning:- drivers/net/vxlan.c:471:35: warning: symbol 'dev' shadows an earlier one drivers/net/vxlan.c:433:26: originally declared here drivers/net/vxlan.c:794:34: warning: symbol 'vxlan' shadows an earlier one drivers/net/vxlan.c:757:26: originally declared here CC: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r--drivers/net/vxlan.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 7624ab1f7b03..62a4438c6084 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -468,15 +468,15 @@ static int vxlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
vni = vxlan->vni;
if (tb[NDA_IFINDEX]) {
- struct net_device *dev;
+ struct net_device *tdev;
if (nla_len(tb[NDA_IFINDEX]) != sizeof(u32))
return -EINVAL;
ifindex = nla_get_u32(tb[NDA_IFINDEX]);
- dev = dev_get_by_index(net, ifindex);
- if (!dev)
+ tdev = dev_get_by_index(net, ifindex);
+ if (!tdev)
return -EADDRNOTAVAIL;
- dev_put(dev);
+ dev_put(tdev);
} else
ifindex = 0;
@@ -792,7 +792,6 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb)
n = neigh_lookup(&arp_tbl, &tip, dev);
if (n) {
- struct vxlan_dev *vxlan = netdev_priv(dev);
struct vxlan_fdb *f;
struct sk_buff *reply;
OpenPOWER on IntegriCloud