diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-01-13 00:25:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:56 -0500 |
commit | c95aaf9af5a1f6dee56d1f2ab4915cd722d608da (patch) | |
tree | 2fe80f504085890a8bd6b7efedab8195a7cede05 /net/ipv4 | |
parent | 66a2f7fd2fddee1ddc5d1d286cd832e50a97258e (diff) |
[IPV4] fib_trie: Fix sparse warnings.
Make FIB TRIE go through sparse checker without warnings.
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_trie.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 2075eea7eea7..3e94a4dddb0c 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -653,7 +653,6 @@ static struct node *resize(struct trie *t, struct tnode *tn) | |||
653 | 653 | ||
654 | static struct tnode *inflate(struct trie *t, struct tnode *tn) | 654 | static struct tnode *inflate(struct trie *t, struct tnode *tn) |
655 | { | 655 | { |
656 | struct tnode *inode; | ||
657 | struct tnode *oldtnode = tn; | 656 | struct tnode *oldtnode = tn; |
658 | int olen = tnode_child_length(tn); | 657 | int olen = tnode_child_length(tn); |
659 | int i; | 658 | int i; |
@@ -701,6 +700,7 @@ static struct tnode *inflate(struct trie *t, struct tnode *tn) | |||
701 | } | 700 | } |
702 | 701 | ||
703 | for (i = 0; i < olen; i++) { | 702 | for (i = 0; i < olen; i++) { |
703 | struct tnode *inode; | ||
704 | struct node *node = tnode_get_child(oldtnode, i); | 704 | struct node *node = tnode_get_child(oldtnode, i); |
705 | struct tnode *left, *right; | 705 | struct tnode *left, *right; |
706 | int size, j; | 706 | int size, j; |
@@ -1037,8 +1037,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen) | |||
1037 | /* Case 1: n is a leaf. Compare prefixes */ | 1037 | /* Case 1: n is a leaf. Compare prefixes */ |
1038 | 1038 | ||
1039 | if (n != NULL && IS_LEAF(n) && tkey_equals(key, n->key)) { | 1039 | if (n != NULL && IS_LEAF(n) && tkey_equals(key, n->key)) { |
1040 | struct leaf *l = (struct leaf *) n; | 1040 | l = (struct leaf *) n; |
1041 | |||
1042 | li = leaf_info_new(plen); | 1041 | li = leaf_info_new(plen); |
1043 | 1042 | ||
1044 | if (!li) | 1043 | if (!li) |
@@ -2234,6 +2233,7 @@ static struct node *fib_trie_get_idx(struct fib_trie_iter *iter, | |||
2234 | } | 2233 | } |
2235 | 2234 | ||
2236 | static void *fib_trie_seq_start(struct seq_file *seq, loff_t *pos) | 2235 | static void *fib_trie_seq_start(struct seq_file *seq, loff_t *pos) |
2236 | __acquires(RCU) | ||
2237 | { | 2237 | { |
2238 | struct fib_trie_iter *iter = seq->private; | 2238 | struct fib_trie_iter *iter = seq->private; |
2239 | struct fib_table *tb; | 2239 | struct fib_table *tb; |
@@ -2276,6 +2276,7 @@ static void *fib_trie_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
2276 | } | 2276 | } |
2277 | 2277 | ||
2278 | static void fib_trie_seq_stop(struct seq_file *seq, void *v) | 2278 | static void fib_trie_seq_stop(struct seq_file *seq, void *v) |
2279 | __releases(RCU) | ||
2279 | { | 2280 | { |
2280 | rcu_read_unlock(); | 2281 | rcu_read_unlock(); |
2281 | } | 2282 | } |