* [PATCH] ocxl: Make use of the helper macro LIST_HEAD()
@ 2022-02-09 3:24 Cai Huoqing
2022-02-09 7:53 ` Andrew Donnellan
2022-02-09 9:51 ` Frederic Barrat
0 siblings, 2 replies; 3+ messages in thread
From: Cai Huoqing @ 2022-02-09 3:24 UTC (permalink / raw)
To: cai.huoqing
Cc: Frederic Barrat, Andrew Donnellan, Arnd Bergmann,
Greg Kroah-Hartman, linuxppc-dev, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ocxl: Make use of the helper macro LIST_HEAD()
2022-02-09 3:24 [PATCH] ocxl: Make use of the helper macro LIST_HEAD() Cai Huoqing
@ 2022-02-09 7:53 ` Andrew Donnellan
2022-02-09 9:51 ` Frederic Barrat
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2022-02-09 7:53 UTC (permalink / raw)
To: Cai Huoqing
Cc: Frederic Barrat, Arnd Bergmann, Greg Kroah-Hartman, linuxppc-dev,
linux-kernel
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 <ajd@linux.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd@linux.ibm.com IBM Australia Limited
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ocxl: Make use of the helper macro LIST_HEAD()
2022-02-09 3:24 [PATCH] ocxl: Make use of the helper macro LIST_HEAD() Cai Huoqing
2022-02-09 7:53 ` Andrew Donnellan
@ 2022-02-09 9:51 ` Frederic Barrat
1 sibling, 0 replies; 3+ messages in thread
From: Frederic Barrat @ 2022-02-09 9:51 UTC (permalink / raw)
To: Cai Huoqing
Cc: Andrew Donnellan, Arnd Bergmann, Greg Kroah-Hartman,
linuxppc-dev, linux-kernel
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 <fbarrat@linux.ibm.com>
> 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 {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-09 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 3:24 [PATCH] ocxl: Make use of the helper macro LIST_HEAD() Cai Huoqing
2022-02-09 7:53 ` Andrew Donnellan
2022-02-09 9:51 ` Frederic Barrat
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).