All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] scsi: megaraid: Use DEFINE_SPINLOCK() for spinlock
@ 2020-12-23 14:15 Zheng Yongjun
  0 siblings, 0 replies; only message in thread
From: Zheng Yongjun @ 2020-12-23 14:15 UTC (permalink / raw)
  To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
	martin.petersen, megaraidlinux.pdl, linux-scsi, linux-kernel
  Cc: Zheng Yongjun

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index e158d3d62056..206089507b9f 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -199,7 +199,7 @@ static bool support_nvme_encapsulation;
 static bool support_pci_lane_margining;
 
 /* define lock for aen poll */
-static spinlock_t poll_aen_lock;
+static DEFINE_SPINLOCK(poll_aen_lock);
 
 extern struct dentry *megasas_debugfs_root;
 
@@ -8875,8 +8875,6 @@ static int __init megasas_init(void)
 	 */
 	pr_info("megasas: %s\n", MEGASAS_VERSION);
 
-	spin_lock_init(&poll_aen_lock);
-
 	support_poll_for_event = 2;
 	support_device_change = 1;
 	support_nvme_encapsulation = true;
-- 
2.22.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-23 14:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 14:15 [PATCH -next] scsi: megaraid: Use DEFINE_SPINLOCK() for spinlock Zheng Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.