Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: megaraid_sas: Use DEFINE_SPINLOCK() for spinlock

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>

authored by

Shixin Liu and committed by
Martin K. Petersen
311e87b7 807b31d8

+1 -3
+1 -3
drivers/scsi/megaraid/megaraid_sas_base.c
··· 213 213 static bool support_pci_lane_margining; 214 214 215 215 /* define lock for aen poll */ 216 - static spinlock_t poll_aen_lock; 216 + static DEFINE_SPINLOCK(poll_aen_lock); 217 217 218 218 extern struct dentry *megasas_debugfs_root; 219 219 extern int megasas_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num); ··· 8933 8933 * Announce driver version and other information 8934 8934 */ 8935 8935 pr_info("megasas: %s\n", MEGASAS_VERSION); 8936 - 8937 - spin_lock_init(&poll_aen_lock); 8938 8936 8939 8937 support_poll_for_event = 2; 8940 8938 support_device_change = 1;