Skip to content

Commit

Permalink
scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock
Browse files Browse the repository at this point in the history
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather
than explicitly calling spin_lock_init().

Link: https://lore.kernel.org/r/20210329094532.4165147-1-liushixin2@huawei.com
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Shixin Liu <liushixin2@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Shixin Liu authored and Martin K. Petersen committed May 10, 2021
1 parent 807b31d commit 311e87b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/scsi/megaraid/megaraid_sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 311e87b

Please sign in to comment.