diff mbox series

[3/3] scsi: hisi_sas: Delete unused lock in hisi_sas_port_notify_formed()

Message ID 1689045300-44318-4-git-send-email-chenxiang66@hisilicon.com
State New
Headers show
Series Some misc changes | expand

Commit Message

chenxiang July 11, 2023, 3:15 a.m. UTC
From: Yihang Li <liyihang9@huawei.com>

Currently spinlock hisi_hba->lock is used by interrupt and thread together
which require to use spin_lock_irqsave/spin_unlcok_irqrestore, but some
places still use spin_lock/unlock.
Check with the code and find there is no necessary to use hisi_hba->lock
in function hisi_sas_port_notify_formed() which is the only place that
use spinlock in interrupt. So delete unused lock in
hisi_sas_port_notify_formed().

Signed-off-by: Yihang Li <liyihang9@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 8f22ece..7a62590 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1065,23 +1065,18 @@  EXPORT_SYMBOL_GPL(hisi_sas_phy_enable);
 
 static void hisi_sas_port_notify_formed(struct asd_sas_phy *sas_phy)
 {
-	struct sas_ha_struct *sas_ha = sas_phy->ha;
-	struct hisi_hba *hisi_hba = sas_ha->lldd_ha;
 	struct hisi_sas_phy *phy = sas_phy->lldd_phy;
 	struct asd_sas_port *sas_port = sas_phy->port;
 	struct hisi_sas_port *port;
-	unsigned long flags;
 
 	if (!sas_port)
 		return;
 
 	port = to_hisi_sas_port(sas_port);
-	spin_lock_irqsave(&hisi_hba->lock, flags);
 	port->port_attached = 1;
 	port->id = phy->port_id;
 	phy->port = port;
 	sas_port->lldd_port = port;
-	spin_unlock_irqrestore(&hisi_hba->lock, flags);
 }
 
 static void hisi_sas_do_release_task(struct hisi_hba *hisi_hba, struct sas_task *task,