[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220917104311.1878250-5-yanaijie@huawei.com>
Date: Sat, 17 Sep 2022 18:43:08 +0800
From: Jason Yan <yanaijie@...wei.com>
To: <martin.petersen@...cle.com>, <jejb@...ux.ibm.com>
CC: <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<hare@...e.com>, <hch@....de>, <bvanassche@....org>,
<john.garry@...wei.com>, <jinpu.wang@...ud.ionos.com>,
Jason Yan <yanaijie@...wei.com>
Subject: [PATCH 4/7] scsi: libsas: use port_and_phy_addr_same() instead of open coded
The sas address comparation of asd_sas_port and expander phy is open
coded. Now we can replace it with port_and_phy_addr_same().
Signed-off-by: Jason Yan <yanaijie@...wei.com>
---
drivers/scsi/libsas/sas_expander.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 18b008f039be..667b276caeee 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -1005,8 +1005,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id)
}
/* Parent and domain coherency */
- if (!dev->parent && (SAS_ADDR(ex_phy->attached_sas_addr) ==
- SAS_ADDR(dev->port->sas_addr))) {
+ if (!dev->parent && port_and_phy_addr_same(dev->port, ex_phy)) {
sas_add_parent_port(dev, phy_id);
return 0;
}
--
2.31.1
Powered by blists - more mailing lists