Commit c95aaf9a authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[IPV4] fib_trie: Fix sparse warnings.

Make FIB TRIE go through sparse checker without warnings.
Signed-off-by: default avatarStephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 66a2f7fd
...@@ -653,7 +653,6 @@ static struct node *resize(struct trie *t, struct tnode *tn) ...@@ -653,7 +653,6 @@ static struct node *resize(struct trie *t, struct tnode *tn)
static struct tnode *inflate(struct trie *t, struct tnode *tn) static struct tnode *inflate(struct trie *t, struct tnode *tn)
{ {
struct tnode *inode;
struct tnode *oldtnode = tn; struct tnode *oldtnode = tn;
int olen = tnode_child_length(tn); int olen = tnode_child_length(tn);
int i; int i;
...@@ -701,6 +700,7 @@ static struct tnode *inflate(struct trie *t, struct tnode *tn) ...@@ -701,6 +700,7 @@ static struct tnode *inflate(struct trie *t, struct tnode *tn)
} }
for (i = 0; i < olen; i++) { for (i = 0; i < olen; i++) {
struct tnode *inode;
struct node *node = tnode_get_child(oldtnode, i); struct node *node = tnode_get_child(oldtnode, i);
struct tnode *left, *right; struct tnode *left, *right;
int size, j; int size, j;
...@@ -1037,8 +1037,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen) ...@@ -1037,8 +1037,7 @@ static struct list_head *fib_insert_node(struct trie *t, u32 key, int plen)
/* Case 1: n is a leaf. Compare prefixes */ /* Case 1: n is a leaf. Compare prefixes */
if (n != NULL && IS_LEAF(n) && tkey_equals(key, n->key)) { if (n != NULL && IS_LEAF(n) && tkey_equals(key, n->key)) {
struct leaf *l = (struct leaf *) n; l = (struct leaf *) n;
li = leaf_info_new(plen); li = leaf_info_new(plen);
if (!li) if (!li)
...@@ -2234,6 +2233,7 @@ static struct node *fib_trie_get_idx(struct fib_trie_iter *iter, ...@@ -2234,6 +2233,7 @@ static struct node *fib_trie_get_idx(struct fib_trie_iter *iter,
} }
static void *fib_trie_seq_start(struct seq_file *seq, loff_t *pos) static void *fib_trie_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(RCU)
{ {
struct fib_trie_iter *iter = seq->private; struct fib_trie_iter *iter = seq->private;
struct fib_table *tb; struct fib_table *tb;
...@@ -2276,6 +2276,7 @@ static void *fib_trie_seq_next(struct seq_file *seq, void *v, loff_t *pos) ...@@ -2276,6 +2276,7 @@ static void *fib_trie_seq_next(struct seq_file *seq, void *v, loff_t *pos)
} }
static void fib_trie_seq_stop(struct seq_file *seq, void *v) static void fib_trie_seq_stop(struct seq_file *seq, void *v)
__releases(RCU)
{ {
rcu_read_unlock(); rcu_read_unlock();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment