From: Jason Yan Date: Wed, 28 Sep 2022 07:01:29 +0000 (+0800) Subject: scsi: libsas: Use sas_phy_addr_match() instead of open coding it X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bfa22905f3865469479f028770a352126ad0d2e8;p=linux.git 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 Link: https://lore.kernel.org/r/20220928070130.3657183-8-yanaijie@huawei.com Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 9d6330c55cbf5..caa0b22867335 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c @@ -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; }