All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Yan <yanaijie@huawei.com>
To: <martin.petersen@oracle.com>, <jejb@linux.ibm.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<hare@suse.com>, <hch@lst.de>, <bvanassche@acm.org>,
	<john.garry@huawei.com>, <jinpu.wang@cloud.ionos.com>,
	Jason Yan <yanaijie@huawei.com>
Subject: [PATCH 5/7] scsi: hisi_sas: use dev_and_phy_addr_same() instead of open coded
Date: Sat, 17 Sep 2022 18:43:09 +0800	[thread overview]
Message-ID: <20220917104311.1878250-6-yanaijie@huawei.com> (raw)
In-Reply-To: <20220917104311.1878250-1-yanaijie@huawei.com>

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@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 33af5b8dede2..4a11b717d03b 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -797,8 +797,7 @@ static int hisi_sas_dev_found(struct domain_device *device)
 
 		for (phy_no = 0; phy_no < phy_num; phy_no++) {
 			phy = &parent_dev->ex_dev.ex_phy[phy_no];
-			if (SAS_ADDR(phy->attached_sas_addr) ==
-				SAS_ADDR(device->sas_addr))
+			if (dev_and_phy_addr_same(device, phy))
 				break;
 		}
 
-- 
2.31.1


  parent reply	other threads:[~2022-09-17 10:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17 10:43 [PATCH 0/7] scsi: libsas: sas address comparation refactor Jason Yan
2022-09-17 10:43 ` [PATCH 1/7] scsi: libsas: introduce sas address conversion and comparation helpers Jason Yan
2022-09-22 14:14   ` John Garry
2022-09-17 10:43 ` [PATCH 2/7] scsi: libsas: use dev_and_phy_addr_same() instead of open coded Jason Yan
2022-09-17 10:43 ` [PATCH 3/7] scsi: libsas: use ex_phy_addr_same() " Jason Yan
2022-09-17 10:43 ` [PATCH 4/7] scsi: libsas: use port_and_phy_addr_same() " Jason Yan
2022-09-17 10:43 ` Jason Yan [this message]
2022-09-17 10:43 ` [PATCH 6/7] scsi: pm8001: use dev_and_phy_addr_same() " Jason Yan
2022-09-22 14:24   ` John Garry
2022-09-23  1:55     ` Jason Yan
2022-09-23  9:44     ` Jason Yan
2022-09-23 10:00       ` John Garry
2022-09-23 10:10         ` Jason Yan
2022-09-23 10:13         ` Jason Yan
2022-09-23 10:30           ` John Garry
2022-09-24  3:22             ` Jason Yan
2022-09-17 10:43 ` [PATCH 7/7] scsi: mvsas: " Jason Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220917104311.1878250-6-yanaijie@huawei.com \
    --to=yanaijie@huawei.com \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=john.garry@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.