Re: [PATCH v5 18/52] cxlflash: Use scsi_cmd_to_rq() instead of scsi_cmnd.request

Hannes Reinecke
2021-08-10T06:27:25Z

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/cxlflash/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
> index 222593bc2afe..2f1894588e0b 100644
> --- a/drivers/scsi/cxlflash/main.c
> +++ b/drivers/scsi/cxlflash/main.c
> @@ -433,7 +433,7 @@ static u32 cmd_to_target_hwq(struct Scsi_Host *host, struct scsi_cmnd *scp,
> hwq = afu->hwq_rr_count++ % afu->num_hwqs;
> break;
> case HWQ_MODE_TAG:
> - tag = blk_mq_unique_tag(scp->request);
> + tag = blk_mq_unique_tag(scsi_cmd_to_rq(scp));
> hwq = blk_mq_unique_tag_to_hwq(tag);
> break;
> case HWQ_MODE_CPU:
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

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