From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933857AbZHEAgc (ORCPT ); Tue, 4 Aug 2009 20:36:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933844AbZHEAga (ORCPT ); Tue, 4 Aug 2009 20:36:30 -0400 Received: from wg.visionengravers.com ([67.136.234.194]:17037 "EHLO visionfs1.visionengravers.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S933309AbZHEAg3 (ORCPT ); Tue, 4 Aug 2009 20:36:29 -0400 From: H Hartley Sweeten To: Linux Kernel Subject: [PATCH] net/ipv4/fib_semantics.c: fix "symbol shadows an earlier one" noise Date: Tue, 4 Aug 2009 17:36:34 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908041736.34604.hartleys@visionengravers.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fib_sync_down_dev() uses a variable named 'nh' when doing a hlist_for_each_entry loop. Later the same variable name is used in a change_nexthops loop. This results in a sparse warning and is potentially confusing. Fix both issues by changing the name of the outer loop variable. The sparse warning is: warning: symbol 'nh' shadows an earlier one Signed-off-by: H Hartley Sweeten --- diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 9b096d6..b0e485a 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -1065,17 +1065,17 @@ int fib_sync_down_dev(struct net_device *dev, int force) unsigned int hash = fib_devindex_hashfn(dev->ifindex); struct hlist_head *head = &fib_info_devhash[hash]; struct hlist_node *node; - struct fib_nh *nh; + struct fib_nh *this_nh; if (force) scope = -1; - hlist_for_each_entry(nh, node, head, nh_hash) { - struct fib_info *fi = nh->nh_parent; + hlist_for_each_entry(this_nh, node, head, nh_hash) { + struct fib_info *fi = this_nh->nh_parent; int dead; BUG_ON(!fi->fib_nhs); - if (nh->nh_dev != dev || fi == prev_fi) + if (this_nh->nh_dev != dev || fi == prev_fi) continue; prev_fi = fi; dead = 0;