netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] vxlan: fix unused variable warning
@ 2016-12-14 20:43 Stephen Hemminger
  2016-12-15  9:17 ` Jiri Benc
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2016-12-14 20:43 UTC (permalink / raw)
  To: davem; +Cc: netdev

Fixes commit 4528520d315ac1 ("vxlan: add ipv6 proxy support")
which added code that caused this warning:

drivers/net/vxlan.c: In function ‘neigh_reduce’:
drivers/net/vxlan.c:1556:25: warning: variable ‘saddr’ set but not used

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/net/vxlan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index bb70dd5..4147fd6 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1553,7 +1553,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb)
 	struct vxlan_dev *vxlan = netdev_priv(dev);
 	struct nd_msg *msg;
 	const struct ipv6hdr *iphdr;
-	const struct in6_addr *saddr, *daddr;
+	const struct in6_addr *daddr;
 	struct neighbour *n;
 	struct inet6_dev *in6_dev;
 
@@ -1562,7 +1562,6 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb)
 		goto out;
 
 	iphdr = ipv6_hdr(skb);
-	saddr = &iphdr->saddr;
 	daddr = &iphdr->daddr;
 
 	msg = (struct nd_msg *)skb_transport_header(skb);
-- 
2.10.2

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

* Re: [PATCH net] vxlan: fix unused variable warning
  2016-12-14 20:43 [PATCH net] vxlan: fix unused variable warning Stephen Hemminger
@ 2016-12-15  9:17 ` Jiri Benc
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Benc @ 2016-12-15  9:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: davem, netdev

On Wed, 14 Dec 2016 12:43:55 -0800, Stephen Hemminger wrote:
> Fixes commit 4528520d315ac1 ("vxlan: add ipv6 proxy support")

Wrong hash, it was commit f564f45c4518. And that commit actually did
use saddr, the actual commit that is being fixed is 4b29dba9c085
("vxlan: fix nonfunctional neigh_reduce()"). Also, please use the
standard Fixes: line when resubmitting this.

The patch itself looks good.

Thanks,

 Jiri

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

end of thread, other threads:[~2016-12-15  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-14 20:43 [PATCH net] vxlan: fix unused variable warning Stephen Hemminger
2016-12-15  9:17 ` Jiri Benc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).