* [PATCH] Drivers: hv: utils: Make use of the helper macro LIST_HEAD()
@ 2022-02-09 3:22 Cai Huoqing
2022-02-09 14:36 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Cai Huoqing @ 2022-02-09 3:22 UTC (permalink / raw)
To: cai.huoqing
Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
Dexuan Cui, linux-hyperv, 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/hv/hv_utils_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
index eb2833d2b5d0..832885198643 100644
--- a/drivers/hv/hv_utils_transport.c
+++ b/drivers/hv/hv_utils_transport.c
@@ -13,7 +13,7 @@
#include "hv_utils_transport.h"
static DEFINE_SPINLOCK(hvt_list_lock);
-static struct list_head hvt_list = LIST_HEAD_INIT(hvt_list);
+static LIST_HEAD(hvt_list);
static void hvt_reset(struct hvutil_transport *hvt)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Drivers: hv: utils: Make use of the helper macro LIST_HEAD()
2022-02-09 3:22 [PATCH] Drivers: hv: utils: Make use of the helper macro LIST_HEAD() Cai Huoqing
@ 2022-02-09 14:36 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2022-02-09 14:36 UTC (permalink / raw)
To: Cai Huoqing
Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
Dexuan Cui, linux-hyperv, linux-kernel
On Wed, Feb 09, 2022 at 11:22:51AM +0800, 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>
Applied to hyperv-fixes. Thanks.
> ---
> drivers/hv/hv_utils_transport.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hv/hv_utils_transport.c b/drivers/hv/hv_utils_transport.c
> index eb2833d2b5d0..832885198643 100644
> --- a/drivers/hv/hv_utils_transport.c
> +++ b/drivers/hv/hv_utils_transport.c
> @@ -13,7 +13,7 @@
> #include "hv_utils_transport.h"
>
> static DEFINE_SPINLOCK(hvt_list_lock);
> -static struct list_head hvt_list = LIST_HEAD_INIT(hvt_list);
> +static LIST_HEAD(hvt_list);
>
> static void hvt_reset(struct hvutil_transport *hvt)
> {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-09 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 3:22 [PATCH] Drivers: hv: utils: Make use of the helper macro LIST_HEAD() Cai Huoqing
2022-02-09 14:36 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox