From patchwork Wed Aug 21 22:19:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 268909 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C77172C00D2 for ; Thu, 22 Aug 2013 08:21:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752806Ab3HUWVP (ORCPT ); Wed, 21 Aug 2013 18:21:15 -0400 Received: from smtpfb2-g21.free.fr ([212.27.42.10]:51274 "EHLO smtpfb2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261Ab3HUWVN (ORCPT ); Wed, 21 Aug 2013 18:21:13 -0400 Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5]) by smtpfb2-g21.free.fr (Postfix) with ESMTP id 44A5AD1A808; Thu, 22 Aug 2013 00:21:08 +0200 (CEST) Received: from romuald.bergerie (unknown [88.178.86.202]) by smtp5-g21.free.fr (Postfix) with ESMTP id 1F5FAD48106; Thu, 22 Aug 2013 00:20:23 +0200 (CEST) Received: by romuald.bergerie (Postfix, from userid 65534) id 497243E1A55; Thu, 22 Aug 2013 00:20:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on romuald.bergerie X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,FREEMAIL_FROM autolearn=unavailable version=3.3.2 Received: from einstein.bergerie (einstein.bergerie [192.168.124.11]) by romuald.bergerie (Postfix) with SMTP id 425273E1A42; Thu, 22 Aug 2013 00:20:06 +0200 (CEST) Received: by einstein.bergerie (sSMTP sendmail emulation); Thu, 22 Aug 2013 00:20:04 +0200 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org Cc: =?UTF-8?q?Vincent=20Stehl=C3=A9?= , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , Ding Tianhong Subject: [PATCH linux-next] ipv6: fix missing braces in ip6_tnl_add_linklocal Date: Thu, 22 Aug 2013 00:19:57 +0200 Message-Id: <1377123597-26515-1-git-send-email-vincent.stehle@laposte.net> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Braces have been removed by mistake by commit df8372c 'ipv6: fix checkpatch errors in net/ipv6/addrconf.c'. This fixes the following compilation warning: net/ipv6/addrconf.c: In function ‘addrconf_notify’: net/ipv6/addrconf.c:2793:22: warning: ‘link_dev’ may be used uninitialized in this function [-Wmaybe-uninitialized] net/ipv6/addrconf.c:2802:21: note: ‘link_dev’ was declared here Signed-off-by: Vincent Stehlé Cc: David S. Miller Cc: Alexey Kuznetsov Cc: James Morris Cc: Hideaki YOSHIFUJI Cc: Patrick McHardy Cc: Ding Tianhong --- Hi, This can be seen in e.g. Linux next-20130821. Best regards, V. net/ipv6/addrconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 980aa98..b2f2e6d 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2803,10 +2803,11 @@ static void ip6_tnl_add_linklocal(struct inet6_dev *idev) struct net *net = dev_net(idev->dev); /* first try to inherit the link-local address from the link device */ - if (idev->dev->iflink) + if (idev->dev->iflink) { link_dev = __dev_get_by_index(net, idev->dev->iflink); if (link_dev && !ipv6_inherit_linklocal(idev, link_dev)) return; + } /* then try to inherit it from any device */ for_each_netdev(net, link_dev) {