archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <>
To: "David S. Miller" <>
Cc: Arnd Bergmann <>, Jiri Benc <>,
	Hannes Frederic Sowa <>,
	Alexander Duyck <>,
	pravin shelar <>,,
Subject: [PATCH] vxlan: hide unused local variable
Date: Mon,  7 Nov 2016 22:09:07 +0100	[thread overview]
Message-ID: <> (raw)

A bugfix introduced a harmless warning in v4.9-rc4:

drivers/net/vxlan.c: In function 'vxlan_group_used':
drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable]

This hides the variable inside of the same #ifdef that is
around its user. The extraneous initialization is removed
at the same time, it was accidentally introduced in the
same commit.

Fixes: c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.")
Signed-off-by: Arnd Bergmann <>
 drivers/net/vxlan.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index cb5cc7c03160..5264c1a49d86 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -944,7 +944,9 @@ static bool vxlan_group_used(struct vxlan_net *vn, struct vxlan_dev *dev)
 	struct vxlan_dev *vxlan;
 	struct vxlan_sock *sock4;
-	struct vxlan_sock *sock6 = NULL;
+	struct vxlan_sock *sock6;
 	unsigned short family = dev->;
 	sock4 = rtnl_dereference(dev->vn4_sock);

             reply	other threads:[~2016-11-07 21:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 21:09 Arnd Bergmann [this message]
     [not found] ` <>
2016-11-07 22:21   ` Arnd Bergmann
2016-11-09 16:19 ` Jiri Benc
2016-11-10  0:00 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] vxlan: hide unused local variable' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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