All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] VXLAN: Fix sparse warnings.
@ 2013-03-26 18:29 Pravin B Shelar
  2013-03-27  4:53 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Pravin B Shelar @ 2013-03-26 18:29 UTC (permalink / raw)
  To: netdev; +Cc: davem, jesse, Pravin B Shelar, Stephen Hemminger

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>
---
 drivers/net/vxlan.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 7624ab1..62a4438 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;
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] VXLAN: Fix sparse warnings.
  2013-03-26 18:29 [PATCH net-next] VXLAN: Fix sparse warnings Pravin B Shelar
@ 2013-03-27  4:53 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-03-27  4:53 UTC (permalink / raw)
  To: pshelar; +Cc: netdev, jesse, stephen

From: Pravin B Shelar <pshelar@nicira.com>
Date: Tue, 26 Mar 2013 11:29:30 -0700

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-27  4:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-26 18:29 [PATCH net-next] VXLAN: Fix sparse warnings Pravin B Shelar
2013-03-27  4:53 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.