aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Yan <[email protected]>2022-09-28 15:01:30 +0800
committerMartin K. Petersen <[email protected]>2022-10-18 03:28:10 +0000
commit868a8824838f1f0d781e838fa36dbb2de6bc7fdd (patch)
tree90ca0795cf291bf361dbd4c44ba2ff5d31a3e783
parentbfa22905f3865469479f028770a352126ad0d2e8 (diff)
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: Jason Yan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/libsas/sas_expander.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index caa0b2286733..2907ca5d0ed4 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -1005,8 +1005,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id)
}
/* Parent and domain coherency */
- if (!dev->parent && (SAS_ADDR(ex_phy->attached_sas_addr) ==
- SAS_ADDR(dev->port->sas_addr))) {
+ if (!dev->parent && sas_phy_match_port_addr(dev->port, ex_phy)) {
sas_add_parent_port(dev, phy_id);
return 0;
}