netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: don't need to initialize instance_table
@ 2010-12-09 10:10 Changli Gao
  2010-12-09 14:03 ` Jan Engelhardt
  2010-12-09 19:56 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Changli Gao @ 2010-12-09 10:10 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao

Since instance_table is a static array, and has been zeroed already, we
don't need to take CPU cycles to initialize it.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/netfilter/nfnetlink_queue.c |    3 ---
 1 file changed, 3 deletions(-)
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 68e67d1..9c80d6f 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -893,9 +893,6 @@ static int __init nfnetlink_queue_init(void)
 {
 	int i, status = -ENOMEM;
 
-	for (i = 0; i < INSTANCE_BUCKETS; i++)
-		INIT_HLIST_HEAD(&instance_table[i]);
-
 	netlink_register_notifier(&nfqnl_rtnl_notifier);
 	status = nfnetlink_subsys_register(&nfqnl_subsys);
 	if (status < 0) {

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-09 20:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 10:10 [PATCH] netfilter: don't need to initialize instance_table Changli Gao
2010-12-09 14:03 ` Jan Engelhardt
2010-12-09 14:27   ` Changli Gao
2010-12-09 20:05     ` David Miller
2010-12-09 19:56 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).