linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md: remove useless INIT_LIST_HEAD()
@ 2022-05-11  2:44 Haowen Bai
  2022-05-11  6:38 ` Paul Menzel
  0 siblings, 1 reply; 3+ messages in thread
From: Haowen Bai @ 2022-05-11  2:44 UTC (permalink / raw)
  To: Song Liu; +Cc: Haowen Bai, linux-raid, linux-kernel

list candidates has been inited staticly through LIST_HEAD,
so there's no need to call another INIT_LIST_HEAD. Simply remove
it.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/md/md.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 707e802d0082..eb2b23ef5ecc 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6491,7 +6491,6 @@ static void autorun_devices(int part)
 					 struct md_rdev, same_set);
 
 		pr_debug("md: considering %s ...\n", bdevname(rdev0->bdev,b));
-		INIT_LIST_HEAD(&candidates);
 		rdev_for_each_list(rdev, tmp, &pending_raid_disks)
 			if (super_90_load(rdev, rdev0, 0) >= 0) {
 				pr_debug("md:  adding %s ...\n",
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] md: remove useless INIT_LIST_HEAD()
  2022-05-11  2:44 [PATCH] md: remove useless INIT_LIST_HEAD() Haowen Bai
@ 2022-05-11  6:38 ` Paul Menzel
  2022-05-11  6:42   ` [PATCH V2] " Haowen Bai
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2022-05-11  6:38 UTC (permalink / raw)
  To: Haowen Bai; +Cc: Song Liu, linux-raid, linux-kernel

Dear Haowen,


Thank you for your patch.

Am 11.05.22 um 04:44 schrieb Haowen Bai:
> list candidates has been inited staticly through LIST_HEAD,

initialized statically

> so there's no need to call another INIT_LIST_HEAD. Simply remove
> it.

Please reflow for 75 characters per line.

> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
>   drivers/md/md.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 707e802d0082..eb2b23ef5ecc 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -6491,7 +6491,6 @@ static void autorun_devices(int part)
>   					 struct md_rdev, same_set);
>   
>   		pr_debug("md: considering %s ...\n", bdevname(rdev0->bdev,b));
> -		INIT_LIST_HEAD(&candidates);
>   		rdev_for_each_list(rdev, tmp, &pending_raid_disks)
>   			if (super_90_load(rdev, rdev0, 0) >= 0) {
>   				pr_debug("md:  adding %s ...\n",


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH V2] md: remove useless INIT_LIST_HEAD()
  2022-05-11  6:38 ` Paul Menzel
@ 2022-05-11  6:42   ` Haowen Bai
  0 siblings, 0 replies; 3+ messages in thread
From: Haowen Bai @ 2022-05-11  6:42 UTC (permalink / raw)
  To: pmenzel; +Cc: baihaowen, linux-kernel, linux-raid, song

list candidates has been initialized statically through LIST_HEAD,
so there's no need to call another INIT_LIST_HEAD. Simply remove it.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
V1->V2: fix typo at description.
 drivers/md/md.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 707e802d0082..eb2b23ef5ecc 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6491,7 +6491,6 @@ static void autorun_devices(int part)
 					 struct md_rdev, same_set);
 
 		pr_debug("md: considering %s ...\n", bdevname(rdev0->bdev,b));
-		INIT_LIST_HEAD(&candidates);
 		rdev_for_each_list(rdev, tmp, &pending_raid_disks)
 			if (super_90_load(rdev, rdev0, 0) >= 0) {
 				pr_debug("md:  adding %s ...\n",
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-11  6:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11  2:44 [PATCH] md: remove useless INIT_LIST_HEAD() Haowen Bai
2022-05-11  6:38 ` Paul Menzel
2022-05-11  6:42   ` [PATCH V2] " Haowen Bai

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).