Commit bfa22905 authored by Jason Yan's avatar Jason Yan Committed by Martin K. Petersen

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: default avatarJason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20220928070130.3657183-8-yanaijie@huawei.comReviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ad74d1da
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment