All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	John Garry <john.garry@huawei.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: [PATCH 20/50] hisi_sas: Use blk_req() instead of scsi_cmnd.request
Date: Fri, 14 May 2021 14:33:26 -0700	[thread overview]
Message-ID: <20210514213356.5264-72-bvanassche@acm.org> (raw)
In-Reply-To: <20210514213356.5264-1-bvanassche@acm.org>

Prepare for removal of the request pointer by using blk_req() instead. This
patch does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c  | 4 ++--
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 5a204074099c..9a93a3374d65 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -185,7 +185,7 @@ static int hisi_sas_slot_index_alloc(struct hisi_hba *hisi_hba,
 	void *bitmap = hisi_hba->slot_index_tags;
 
 	if (scsi_cmnd)
-		return scsi_cmnd->request->tag;
+		return blk_req(scsi_cmnd)->tag;
 
 	spin_lock(&hisi_hba->lock);
 	index = find_next_zero_bit(bitmap, hisi_hba->slot_index_count,
@@ -449,7 +449,7 @@ static int hisi_sas_task_prep(struct sas_task *task,
 		unsigned int dq_index;
 		u32 blk_tag;
 
-		blk_tag = blk_mq_unique_tag(scmd->request);
+		blk_tag = blk_mq_unique_tag(blk_req(scmd));
 		dq_index = blk_mq_unique_tag_to_hwq(blk_tag);
 		*dq_pointer = dq = &hisi_hba->dq[dq_index];
 	} else {
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 499c770d405c..ed02eecd606d 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -1153,7 +1153,7 @@ static void fill_prot_v3_hw(struct scsi_cmnd *scsi_cmnd,
 {
 	unsigned char prot_op = scsi_get_prot_op(scsi_cmnd);
 	unsigned int interval = scsi_prot_interval(scsi_cmnd);
-	u32 lbrt_chk_val = t10_pi_ref_tag(scsi_cmnd->request);
+	u32 lbrt_chk_val = t10_pi_ref_tag(blk_req(scsi_cmnd));
 
 	switch (prot_op) {
 	case SCSI_PROT_READ_INSERT:

  parent reply	other threads:[~2021-05-14 21:36 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 21:32 [PATCH 00/50] Remove the request pointer from struct scsi_cmnd Bart Van Assche
2021-05-14 21:32 ` [PATCH 01/50] core: Introduce the blk_req() function Bart Van Assche
2021-05-15  6:47   ` Christoph Hellwig
2021-05-17 16:07     ` Bart Van Assche
2021-05-14 21:32 ` [PATCH 02/50] core: Use blk_req() instead of scsi_cmnd.request Bart Van Assche
2021-05-14 21:32 ` [PATCH 03/50] sd: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 04/50] sr: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 05/50] scsi_transport_fc: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 06/50] scsi_transport_spi: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 07/50] ata: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 08/50] rdma/iser: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 09/50] rdma/srp: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 10/50] zfcp: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 11/50] 53c700: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 12/50] NCR5380: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 13/50] aacraid: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 14/50] advansys: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 15/50] bnx2i: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 16/50] csiostor: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 17/50] cxlflash: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 18/50] dpt_i2o: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 19/50] fnic: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 20/50] hisi_sas: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 21/50] hpsa: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 22/50] ibmvfc: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 23/50] ibmvscsi: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 24/50] ips: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 25/50] libsas: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 26/50] lpfc: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 27/50] megaraid: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 28/50] mpt3sas: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 29/50] mvumi: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 30/50] myrb: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 31/50] myrs: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 32/50] ncr53c8xx: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 33/50] qedf: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 34/50] qedi: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 35/50] qla1280: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 36/50] qla2xxx: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 37/50] qla4xxx: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 38/50] qlogicpti: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 39/50] scsi_debug: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 40/50] smartpqi: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 41/50] snic: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 42/50] stex: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 43/50] sun3_scsi: " Bart Van Assche
2021-05-14 21:32 ` [PATCH 44/50] sym53c8xx: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 45/50] ufs: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 46/50] virtio_scsi: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 47/50] xen-scsifront: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 48/50] tcm_loop: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 49/50] usb-storage: " Bart Van Assche
2021-05-15 15:09   ` Alan Stern
2021-05-14 21:33 ` [PATCH 50/50] core: Remove the request member from struct scsi_cmnd Bart Van Assche
2021-05-14 21:33 ` [PATCH 00/50] Remove the request pointer " Bart Van Assche
2021-05-14 21:33 ` [PATCH 01/50] core: Introduce the blk_req() function Bart Van Assche
2021-05-14 21:33 ` [PATCH 02/50] core: Use blk_req() instead of scsi_cmnd.request Bart Van Assche
2021-05-14 21:33 ` [PATCH 03/50] sd: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 04/50] sr: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 05/50] scsi_transport_fc: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 06/50] scsi_transport_spi: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 07/50] ata: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 08/50] rdma/iser: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 09/50] rdma/srp: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 10/50] zfcp: " Bart Van Assche
2021-05-17 17:29   ` Benjamin Block
2021-05-14 21:33 ` [PATCH 11/50] 53c700: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 12/50] NCR5380: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 13/50] aacraid: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 14/50] advansys: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 15/50] bnx2i: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 16/50] csiostor: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 17/50] cxlflash: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 18/50] dpt_i2o: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 19/50] fnic: " Bart Van Assche
2021-05-14 21:33 ` Bart Van Assche [this message]
2021-05-17  9:49   ` [PATCH 20/50] hisi_sas: " John Garry
2021-05-14 21:33 ` [PATCH 21/50] hpsa: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 22/50] ibmvfc: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 23/50] ibmvscsi: " Bart Van Assche
2021-05-14 21:33 ` [PATCH 24/50] ips: " Bart Van Assche

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=20210514213356.5264-72-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=john.garry@huawei.com \
    --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.