[openib-general] [PATCH][2/3] Use static LIST_HEAD() to initialize

Roland Dreier roland at topspin.com
Sun Oct 24 21:27:40 PDT 2004


Use the LIST_HEAD macro instead of explicitly calling INIT_LIST_HEAD().

Index: linux-kernel/infiniband/core/ib_agent.c
===================================================================
--- linux-kernel.orig/infiniband/core/ib_agent.c	2004-10-24 20:32:27.000000000 -0700
+++ linux-kernel/infiniband/core/ib_agent.c	2004-10-24 20:32:58.000000000 -0700
@@ -35,7 +35,7 @@
 
 
 static spinlock_t ib_agent_port_list_lock = SPIN_LOCK_UNLOCKED;
-static struct list_head ib_agent_port_list;
+static LIST_HEAD(ib_agent_port_list);
 
 /*
  * Fixup a directed route SMP for sending.  Return 0 if the SMP should be
@@ -847,7 +847,6 @@
                                                                                 
 static int __init ib_agent_init(void)
 {
-	INIT_LIST_HEAD(&ib_agent_port_list);
         if (ib_register_client(&ib_agent_client)) {
                 printk(KERN_ERR SPFX "Couldn't register ib_agent client\n");
                 return -EINVAL;




More information about the general mailing list