[PATCH] ocxl: Make use of the helper macro LIST_HEAD()

Subsystems: char and misc drivers, ocxl (open coherent accelerator processor interface opencapi) driver, the rest

STALE1637d LANDED

Landed in mainline as 4044fe5525ad on 2022-02-25.

3 messages, 3 authors, 2022-02-09 · open the first message on its own page

[PATCH] ocxl: Make use of the helper macro LIST_HEAD()

From: Cai Huoqing <cai.huoqing@linux.dev>
Date: 2022-02-09 04:13:18

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

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
---
 drivers/misc/ocxl/link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
index ab039c115381..9670d02c927f 100644
--- a/drivers/misc/ocxl/link.c
+++ b/drivers/misc/ocxl/link.c
@@ -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 {
-- 
2.25.1

Re: [PATCH] ocxl: Make use of the helper macro LIST_HEAD()

From: Andrew Donnellan <hidden>
Date: 2022-02-09 07:53:40

On 9/2/22 14:24, Cai Huoqing wrote:
Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
LGTM

Acked-by: Andrew Donnellan <redacted>

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd@linux.ibm.com             IBM Australia Limited

Re: [PATCH] ocxl: Make use of the helper macro LIST_HEAD()

From: Frederic Barrat <hidden>
Date: 2022-02-09 11:44:58


On 09/02/2022 04:24, Cai Huoqing wrote:
Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
---
Thanks!
Acked-by: Frederic Barrat <redacted>

quoted hunk
  drivers/misc/ocxl/link.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/ocxl/link.c b/drivers/misc/ocxl/link.c
index ab039c115381..9670d02c927f 100644
--- a/drivers/misc/ocxl/link.c
+++ b/drivers/misc/ocxl/link.c
@@ -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 {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help