[PATCH 7/7] scsi: mvsas: use dev_and_phy_addr_same() instead of open coded

Jason Yan posted 7 patches 3 years, 6 months ago
There is a newer version of this series
[PATCH 7/7] scsi: mvsas: use dev_and_phy_addr_same() instead of open coded
Posted by Jason Yan 3 years, 6 months ago
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/mvsas/mv_sas.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index a6867dae0e7c..766e02c3f459 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1194,8 +1194,7 @@ static int mvs_dev_found_notify(struct domain_device *dev, int lock)
 		struct ex_phy *phy;
 		for (phy_id = 0; phy_id < phy_num; phy_id++) {
 			phy = &parent_dev->ex_dev.ex_phy[phy_id];
-			if (SAS_ADDR(phy->attached_sas_addr) ==
-				SAS_ADDR(dev->sas_addr)) {
+			if (dev_and_phy_addr_same(dev, phy)) {
 				mvi_device->attached_phy = phy_id;
 				break;
 			}
-- 
2.31.1