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

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

The SAS address comparison of asd_sas_port and expander phy is open
coded. Replace it with sas_phy_match_port_addr().
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20220928070130.3657183-9-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 bfa22905
...@@ -1005,8 +1005,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) ...@@ -1005,8 +1005,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id)
} }
/* Parent and domain coherency */ /* Parent and domain coherency */
if (!dev->parent && (SAS_ADDR(ex_phy->attached_sas_addr) == if (!dev->parent && sas_phy_match_port_addr(dev->port, ex_phy)) {
SAS_ADDR(dev->port->sas_addr))) {
sas_add_parent_port(dev, phy_id); sas_add_parent_port(dev, phy_id);
return 0; return 0;
} }
......
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