From 6aded12b10e0c9536ee2c8ee33a1f7ed52f9cb34 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 24 Feb 2022 18:55:51 +0100 Subject: scsi: core: Remove struct scsi_request Let submitters initialize the scmd->allowed field directly instead of indirecting through struct scsi_request and remove the now superfluous structure. Link: https://lore.kernel.org/r/20220224175552.988286-8-hch@lst.de Reviewed-by: Bart Van Assche Reviewed-by: John Garry Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- drivers/scsi/st.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/scsi/st.c') diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index c8533ca225bc..6d4213e2e49a 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -539,7 +539,6 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, int timeout, int retries) { struct request *req; - struct scsi_request *rq; struct rq_map_data *mdata = &SRpnt->stp->buffer->map_data; int err = 0; struct scsi_tape *STp = SRpnt->stp; @@ -551,7 +550,6 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, if (IS_ERR(req)) return PTR_ERR(req); scmd = blk_mq_rq_to_pdu(req); - rq = scsi_req(req); req->rq_flags |= RQF_QUIET; mdata->null_mapped = 1; @@ -580,7 +578,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, scmd->cmd_len = COMMAND_SIZE(cmd[0]); memcpy(scmd->cmnd, cmd, scmd->cmd_len); req->timeout = timeout; - rq->retries = retries; + scmd->allowed = retries; req->end_io_data = SRpnt; blk_execute_rq_nowait(req, true, st_scsi_execute_end); -- cgit