[PATCH] ipv4: fix debug info in tnode_new

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE5129d

2 messages, 2 authors, 2012-07-30 · open the first message on its own page

[PATCH] ipv4: fix debug info in tnode_new

From: Lin Ming <hidden>
Date: 2012-07-29 11:20:42

It should print size of struct rt_trie_node * allocated instead of size
of struct rt_trie_node.

Signed-off-by: Lin Ming <redacted>
---
 net/ipv4/fib_trie.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 18cbc15..2a6fdc2 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -473,7 +473,7 @@ static struct tnode *tnode_new(t_key key, int pos, int bits)
 	}
 
 	pr_debug("AT %p s=%zu %zu\n", tn, sizeof(struct tnode),
-		 sizeof(struct rt_trie_node) << bits);
+		 sizeof(struct rt_trie_node *) << bits);
 	return tn;
 }
 
-- 
1.7.2.5

Re: [PATCH] ipv4: fix debug info in tnode_new

From: David Miller <davem@davemloft.net>
Date: 2012-07-30 06:19:13

From: Lin Ming <redacted>
Date: Sun, 29 Jul 2012 19:19:55 +0800
It should print size of struct rt_trie_node * allocated instead of size
of struct rt_trie_node.

Signed-off-by: Lin Ming <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help