[PATCH v2 7/8] scsi: libsas: use sas_phy_addr_same() instead of open coded

Jason Yan posted 8 patches 3 years, 6 months ago
There is a newer version of this series
[PATCH v2 7/8] scsi: libsas: use sas_phy_addr_same() instead of open coded
Posted by Jason Yan 3 years, 6 months ago
The sas address comparation of expander phys is open coded. Now we can
replace it with sas_phy_addr_same().

Signed-off-by: Jason Yan <yanaijie@huawei.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 b2b5103c3e76..c9d738ad8176 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -2058,8 +2058,7 @@ static int sas_rediscover(struct domain_device *dev, const int phy_id)
 
 			if (i == phy_id)
 				continue;
-			if (SAS_ADDR(phy->attached_sas_addr) ==
-			    SAS_ADDR(changed_phy->attached_sas_addr)) {
+			if (sas_phy_addr_same(phy, changed_phy)) {
 				last = false;
 				break;
 			}
-- 
2.31.1