scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock
Subsystems (2)
PATCH 1/1 scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init().
Signed-off-by Shixin Liu <[email protected]>
--- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +1 -3
@@ -213,7 +213,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;extern int megasas_blk_mq_poll (struct Scsi_Host *shost,unsigned int queue_num);
@@ -8934,8 +8934,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;
Signature · 1 line
2.25.1
Quoted 3 lines · Shixin Liu
spinlock can be initialized automatically with
DEFINE_SPINLOCK()rather than explicitly callingspin_lock_init().
Acked-by Sumit Saxena <[email protected]>
Quoted 31 lines
Signed-off-by Shixin Liu <[email protected]>--- drivers/scsi/megaraid/megaraid_sas_base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/scsi/megaraid/megaraid_sas_base.c +1
-4@@ -213,7 +213,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;extern int megasas_blk_mq_poll (struct Scsi_Host *shost,unsigned int queue_num);@@ -8934,8 +8934,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.25.1
Martin K. Petersen
AppliedQuoted 2 lines · Shixin Liu
spinlock can be initialized automatically with
DEFINE_SPINLOCK()rather than explicitly callingspin_lock_init().
Applied to 5.14/scsi-queue, thanks!
[1/1] scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock
https://git.kernel.org/mkp/scsi/c/311e87b70913
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering