[PATCH 5/7] scsi: hisi_sas: use dev_and_phy_addr_same() instead of open coded
From: Jason Yan
Date: Sat Sep 17 2022 - 06:33:05 EST
The sas address comparation of domain device and expander phy is open
coded. Now we can replace it with dev_and_phy_addr_same().
Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx>
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 33af5b8dede2..4a11b717d03b 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -797,8 +797,7 @@ static int hisi_sas_dev_found(struct domain_device *device)
for (phy_no = 0; phy_no < phy_num; phy_no++) {
phy = &parent_dev->ex_dev.ex_phy[phy_no];
- if (SAS_ADDR(phy->attached_sas_addr) ==
- SAS_ADDR(device->sas_addr))
+ if (dev_and_phy_addr_same(device, phy))
break;
}
--
2.31.1