From patchwork Mon Nov 7 21:09:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101571 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1219864qge; Mon, 7 Nov 2016 13:10:49 -0800 (PST) X-Received: by 10.99.114.73 with SMTP id c9mr1565917pgn.44.1478553049547; Mon, 07 Nov 2016 13:10:49 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 6si32920183pfl.234.2016.11.07.13.10.49; Mon, 07 Nov 2016 13:10:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbcKGVKr (ORCPT + 4 others); Mon, 7 Nov 2016 16:10:47 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:50065 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbcKGVKp (ORCPT ); Mon, 7 Nov 2016 16:10:45 -0500 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0Ltibd-1cmyyY1FB7-0117oB; Mon, 07 Nov 2016 22:10:23 +0100 From: Arnd Bergmann To: "David S. Miller" Cc: Arnd Bergmann , Jiri Benc , Hannes Frederic Sowa , Alexander Duyck , pravin shelar , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] vxlan: hide unused local variable Date: Mon, 7 Nov 2016 22:09:07 +0100 Message-Id: <20161107211017.857340-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:4zdKCXrzT22VwS8pYuOE86gxZv6kWCIdelvaK3CrxBe4bTK+JDX T55nPnCP+bK4Xbb8PLRPz8FRXeTvzZmlh0Lfq24hdwSEcWnqyESIE+oypMxoB8ZSzG0OA86 haHtrc4Lw1iwZchKX7BoHoWlCAnUtpMlSgnyWyTOwSiWSaGeP56/eVim42BhYlgxF3FoyV8 3U2fcn9Fcb8jJnCXg7OdA== X-UI-Out-Filterresults: notjunk:1; V01:K0:yrkJlj99nH4=:b9OdFQ2RoHwW/35JTMTu5H TX7P/oZnZKN3NgKjohMcI+zMlvel4m3ZxFs1U47Yw+57xqwDlpCVn3id/StwiDLRb73lXhyBV +mdU3HhHPivrtQPyDNWKNkB5DjKymNpI/PM4PMZ4wLHUmPY69jbw5hBfvF/B3ashHfyWnR+gN waowRNlzmlGBfsSFWRTDCoo0UhRjsNGzIQYjvfjQEqpCbRv4KVg/b+Gr9usv2K6z6Ith8Rr1b de93B810f1iM6ShpnK0c07qSbWvNzL1BYoYsNj9ycnSM7jSq8fxuUZ9uf1dlqbLOIGBARofrf cADb1FzxATv6j7z0zglEM1PuOr5NOGQsIS6jbVw1lq2ZO3V4Cub+at+zD+WWYzvhVwZ9HVXoG OMgkXaDBDbsqFJZvfKL0j2A6RHPJ+PdwT6UWYnedGvIr9hNE150qKGSkxN0VIXw/f395HOXd4 NUq5vvfOCZpnNzsNq4lUSPgqxv5qdp3lG1whFuoKIsRGL1zCbaTkCDdk5TYg2GYwp4huc/uJS zS3AoURYE90pdbqypZVMnfPrIlk28d42XqmCncVxz61iozYNDRtBfHVBT3Gw/VKscbSZ8Q/by NVWm1UAogmuV11gvVZKuyhMUplcgWPL9URNTuHJ2eVL7Dga3EtlONDL+g22ABW1GCF3eblvn8 pBDW+jUdQCwuP8SnGtQpNArV4pqnTLmPvGHuEYSY994YDotYC2/pSoZfU97g2SolAbho= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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(-) -- 2.9.0 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; +#if IS_ENABLED(CONFIG_IPV6) + struct vxlan_sock *sock6; +#endif unsigned short family = dev->default_dst.remote_ip.sa.sa_family; sock4 = rtnl_dereference(dev->vn4_sock);