linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: fnic: remove unnecessary spin_lock_init() and INIT_LIST_HEAD()
@ 2021-03-30 12:59 Yang Yingliang
  2021-04-13  5:48 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-03-30 12:59 UTC (permalink / raw)
  To: linux-kernel, linux-scsi; +Cc: martin.petersen

The spinlock and list head of fnic_list is initialized statically.
It is unnecessary to initialize by spin_lock_init() and INIT_LIST_HEAD().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/scsi/fnic/fnic_main.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 186c3ab4456b..786f9d2704b6 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -1100,9 +1100,6 @@ static int __init fnic_init_module(void)
 		goto err_create_fnic_workq;
 	}
 
-	spin_lock_init(&fnic_list_lock);
-	INIT_LIST_HEAD(&fnic_list);
-
 	fnic_fip_queue = create_singlethread_workqueue("fnic_fip_q");
 	if (!fnic_fip_queue) {
 		printk(KERN_ERR PFX "fnic FIP work queue create failed\n");
-- 
2.25.1


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

* Re: [PATCH -next] scsi: fnic: remove unnecessary spin_lock_init() and INIT_LIST_HEAD()
  2021-03-30 12:59 [PATCH -next] scsi: fnic: remove unnecessary spin_lock_init() and INIT_LIST_HEAD() Yang Yingliang
@ 2021-04-13  5:48 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-04-13  5:48 UTC (permalink / raw)
  To: linux-scsi, Yang Yingliang, linux-kernel; +Cc: Martin K . Petersen

On Tue, 30 Mar 2021 20:59:11 +0800, Yang Yingliang wrote:

> The spinlock and list head of fnic_list is initialized statically.
> It is unnecessary to initialize by spin_lock_init() and INIT_LIST_HEAD().

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: fnic: remove unnecessary spin_lock_init() and INIT_LIST_HEAD()
      https://git.kernel.org/mkp/scsi/c/aa6f2fccd711

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-04-13  5:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30 12:59 [PATCH -next] scsi: fnic: remove unnecessary spin_lock_init() and INIT_LIST_HEAD() Yang Yingliang
2021-04-13  5:48 ` Martin K. Petersen

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