diff mbox series

[v5,17/52] csiostor: Use scsi_cmd_to_rq() instead of scsi_cmnd.request

Message ID 20210809230355.8186-18-bvanassche@acm.org
State New
Headers show
Series [v5,01/52] core: Introduce the scsi_cmd_to_rq() function | expand

Commit Message

Bart Van Assche Aug. 9, 2021, 11:03 p.m. UTC
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/csiostor/csio_scsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Hannes Reinecke Aug. 10, 2021, 6:26 a.m. UTC | #1
On 8/10/21 1:03 AM, Bart Van Assche wrote:
> Prepare for removal of the request pointer by using scsi_cmd_to_rq()

> instead. This patch does not change any functionality.

> 

> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

> ---

>   drivers/scsi/csiostor/csio_scsi.c | 6 +++---

>   1 file changed, 3 insertions(+), 3 deletions(-)

> 

> diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c

> index 56b9ad0a1ca0..3b2eb6ce1fcf 100644

> --- a/drivers/scsi/csiostor/csio_scsi.c

> +++ b/drivers/scsi/csiostor/csio_scsi.c

> @@ -1786,7 +1786,7 @@ csio_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmnd)

>   	struct csio_scsi_qset *sqset;

>   	struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));

>   

> -	sqset = &hw->sqset[ln->portid][blk_mq_rq_cpu(cmnd->request)];

> +	sqset = &hw->sqset[ln->portid][blk_mq_rq_cpu(scsi_cmd_to_rq(cmnd))];

>   

>   	nr = fc_remote_port_chkready(rport);

>   	if (nr) {

> @@ -1989,13 +1989,13 @@ csio_eh_abort_handler(struct scsi_cmnd *cmnd)

>   		csio_info(hw,

>   			"Aborted SCSI command to (%d:%llu) tag %u\n",

>   			cmnd->device->id, cmnd->device->lun,

> -			cmnd->request->tag);

> +			scsi_cmd_to_rq(cmnd)->tag);

>   		return SUCCESS;

>   	} else {

>   		csio_info(hw,

>   			"Failed to abort SCSI command, (%d:%llu) tag %u\n",

>   			cmnd->device->id, cmnd->device->lun,

> -			cmnd->request->tag);

> +			scsi_cmd_to_rq(cmnd)->tag);

>   		return FAILED;

>   	}

>   }

> 

The 'tag' thing again ...

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
diff mbox series

Patch

diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
index 56b9ad0a1ca0..3b2eb6ce1fcf 100644
--- a/drivers/scsi/csiostor/csio_scsi.c
+++ b/drivers/scsi/csiostor/csio_scsi.c
@@ -1786,7 +1786,7 @@  csio_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmnd)
 	struct csio_scsi_qset *sqset;
 	struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
 
-	sqset = &hw->sqset[ln->portid][blk_mq_rq_cpu(cmnd->request)];
+	sqset = &hw->sqset[ln->portid][blk_mq_rq_cpu(scsi_cmd_to_rq(cmnd))];
 
 	nr = fc_remote_port_chkready(rport);
 	if (nr) {
@@ -1989,13 +1989,13 @@  csio_eh_abort_handler(struct scsi_cmnd *cmnd)
 		csio_info(hw,
 			"Aborted SCSI command to (%d:%llu) tag %u\n",
 			cmnd->device->id, cmnd->device->lun,
-			cmnd->request->tag);
+			scsi_cmd_to_rq(cmnd)->tag);
 		return SUCCESS;
 	} else {
 		csio_info(hw,
 			"Failed to abort SCSI command, (%d:%llu) tag %u\n",
 			cmnd->device->id, cmnd->device->lun,
-			cmnd->request->tag);
+			scsi_cmd_to_rq(cmnd)->tag);
 		return FAILED;
 	}
 }