scsi: libsas: Use sas_phy_addr_match() instead of open coding it

The SAS address comparison of expander phys is open coded. Replace it with
sas_phy_addr_match().

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20220928070130.3657183-8-yanaijie@huawei.com
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Jason Yan 2022-09-28 15:01:29 +08:00 committed by Martin K. Petersen
parent ad74d1dadb
commit bfa22905f3

View File

@ -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_match(phy, changed_phy)) {
last = false;
break;
}