Message ID | 20220917104311.1878250-8-yanaijie@huawei.com |
---|---|
State | New |
Headers | show |
Series | scsi: libsas: sas address comparation refactor | expand |
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; }
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(-)