Skip to contentSkip to conversation

ocxl: Make use of the helper macro LIST_HEAD()

PATCH In review Cai Huoqing 3 participants 3 messages Feb 9, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocxl: Make use of the helper macro LIST_HEAD()

Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code.

---
 drivers/misc/ocxl/link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/ocxl/link.c +1 -1
index ab039c115381..9670d02c927f 100644
@@ -94,7 +94,7 @@ struct ocxl_link {
 	struct spa *spa;
 	void *platform_data;
 };
-static struct list_head links_list = LIST_HEAD_INIT(links_list);
+static LIST_HEAD(links_list);
 static DEFINE_MUTEX(links_list_lock);
 
 enum xsl_response {
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#2 lore raw
In reply to Cai Huoqing
Quoted 5 lines · Cai Huoqing

Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code.

---

Thanks!

Quoted 16 lines
  drivers/misc/ocxl/link.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/ocxl/link.c +1 -1
index ab039c115381..9670d02c927f 100644
@@ -94,7 +94,7 @@ struct ocxl_link {
  	struct spa *spa;
  	void *platform_data;
  };
-static struct list_head links_list = LIST_HEAD_INIT(links_list);
+static LIST_HEAD(links_list);
  static DEFINE_MUTEX(links_list_lock);
 
  enum xsl_response {