diff mbox series

[5/7] scsi: hisi_sas: use dev_and_phy_addr_same() instead of open coded

Message ID 20220917104311.1878250-6-yanaijie@huawei.com
State New
Headers show
Series scsi: libsas: sas address comparation refactor | expand

Commit Message

Jason Yan Sept. 17, 2022, 10:43 a.m. UTC
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@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 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 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;
 		}