lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220917104311.1878250-8-yanaijie@huawei.com>
Date:   Sat, 17 Sep 2022 18:43:11 +0800
From:   Jason Yan <yanaijie@...wei.com>
To:     <martin.petersen@...cle.com>, <jejb@...ux.ibm.com>
CC:     <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <hare@...e.com>, <hch@....de>, <bvanassche@....org>,
        <john.garry@...wei.com>, <jinpu.wang@...ud.ionos.com>,
        Jason Yan <yanaijie@...wei.com>
Subject: [PATCH 7/7] scsi: mvsas: use dev_and_phy_addr_same() instead of open coded

The sas address comparation of domain device and expander phy is open
coded. Now we can replace it with dev_and_phy_addr_same().

Signed-off-by: Jason Yan <yanaijie@...wei.com>
---
 drivers/scsi/mvsas/mv_sas.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index a6867dae0e7c..766e02c3f459 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -1194,8 +1194,7 @@ static int mvs_dev_found_notify(struct domain_device *dev, int lock)
 		struct ex_phy *phy;
 		for (phy_id = 0; phy_id < phy_num; phy_id++) {
 			phy = &parent_dev->ex_dev.ex_phy[phy_id];
-			if (SAS_ADDR(phy->attached_sas_addr) ==
-				SAS_ADDR(dev->sas_addr)) {
+			if (dev_and_phy_addr_same(dev, phy)) {
 				mvi_device->attached_phy = phy_id;
 				break;
 			}
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ