[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200908041736.34604.hartleys@visionengravers.com>
Date: Tue, 4 Aug 2009 17:36:34 -0700
From: H Hartley Sweeten <hartleys@...ionengravers.com>
To: Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] net/ipv4/fib_semantics.c: fix "symbol shadows an earlier one" noise
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 <hsweeten@...ionengravers.com>
---
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists