All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 -next] scsi: target: iscsi: use DEFINE_MUTEX() for mutex lock
@ 2020-12-24 13:25 Zheng Yongjun
  0 siblings, 0 replies; only message in thread
From: Zheng Yongjun @ 2020-12-24 13:25 UTC (permalink / raw)
  To: linux-scsi, target-devel, linux-kernel; +Cc: martin.petersen, Zheng Yongjun

mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/target/iscsi/iscsi_target.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 518fac4864cf..b33726229f94 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -50,7 +50,7 @@ static DEFINE_MUTEX(np_lock);
 
 static struct idr tiqn_idr;
 DEFINE_IDA(sess_ida);
-struct mutex auth_id_lock;
+DEFINE_MUTEX(auth_id_lock);
 
 struct iscsit_global *iscsit_global;
 
@@ -690,7 +690,6 @@ static int __init iscsi_target_init_module(void)
 		return -1;
 
 	spin_lock_init(&iscsit_global->ts_bitmap_lock);
-	mutex_init(&auth_id_lock);
 	idr_init(&tiqn_idr);
 
 	ret = target_register_template(&iscsi_ops);
-- 
2.22.0


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

only message in thread, other threads:[~2020-12-24 13:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 13:25 [PATCH v2 -next] scsi: target: iscsi: use DEFINE_MUTEX() for mutex lock 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.