Message ID | 20210518174450.20664-49-bvanassche@acm.org |
---|---|
State | Superseded |
Headers | show |
Series | Remove the request pointer from struct scsi_cmnd | expand |
On 18.05.21 19:44, 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/target/loopback/tcm_loop.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c > index 2687fd7d45db..834eceaac9cd 100644 > --- a/drivers/target/loopback/tcm_loop.c > +++ b/drivers/target/loopback/tcm_loop.c > @@ -183,7 +183,7 @@ static int tcm_loop_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) > > memset(tl_cmd, 0, sizeof(*tl_cmd)); > tl_cmd->sc = sc; > - tl_cmd->sc_cmd_tag = sc->request->tag; > + tl_cmd->sc_cmd_tag = scsi_cmd_to_rq(sc)->tag; > > tcm_loop_target_queue_cmd(tl_cmd); > return 0; > @@ -249,7 +249,7 @@ static int tcm_loop_abort_task(struct scsi_cmnd *sc) > tl_hba = *(struct tcm_loop_hba **)shost_priv(sc->device->host); > tl_tpg = &tl_hba->tl_hba_tpgs[sc->device->id]; > ret = tcm_loop_issue_tmr(tl_tpg, sc->device->lun, > - sc->request->tag, TMR_ABORT_TASK); > + scsi_cmd_to_rq(sc)->tag, TMR_ABORT_TASK); > return (ret == TMR_FUNCTION_COMPLETE) ? SUCCESS : FAILED; > } > > Looks good. Reviewed-by: Bodo Stroesser <bostroesser@gmail.com>
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 2687fd7d45db..834eceaac9cd 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -183,7 +183,7 @@ static int tcm_loop_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) memset(tl_cmd, 0, sizeof(*tl_cmd)); tl_cmd->sc = sc; - tl_cmd->sc_cmd_tag = sc->request->tag; + tl_cmd->sc_cmd_tag = scsi_cmd_to_rq(sc)->tag; tcm_loop_target_queue_cmd(tl_cmd); return 0; @@ -249,7 +249,7 @@ static int tcm_loop_abort_task(struct scsi_cmnd *sc) tl_hba = *(struct tcm_loop_hba **)shost_priv(sc->device->host); tl_tpg = &tl_hba->tl_hba_tpgs[sc->device->id]; ret = tcm_loop_issue_tmr(tl_tpg, sc->device->lun, - sc->request->tag, TMR_ABORT_TASK); + scsi_cmd_to_rq(sc)->tag, TMR_ABORT_TASK); return (ret == TMR_FUNCTION_COMPLETE) ? SUCCESS : FAILED; }
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/target/loopback/tcm_loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)