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

scsi: fnic: Remove unnecessary spin_lock_init() and INIT_LIST_HEAD()

The spinlock and list head of fnic_list are initialized statically. It is
unnecessary to initialize them.

Link: https://lore.kernel.org/r/20210330125911.1050879-1-yangyingliang@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Yang Yingliang and committed by
Martin K. Petersen
aa6f2fcc 4dec8004

-3
-3
drivers/scsi/fnic/fnic_main.c
··· 1100 1100 goto err_create_fnic_workq; 1101 1101 } 1102 1102 1103 - spin_lock_init(&fnic_list_lock); 1104 - INIT_LIST_HEAD(&fnic_list); 1105 - 1106 1103 fnic_fip_queue = create_singlethread_workqueue("fnic_fip_q"); 1107 1104 if (!fnic_fip_queue) { 1108 1105 printk(KERN_ERR PFX "fnic FIP work queue create failed\n");