Re: [PATCH v2 44/84] libiscsi: Call scsi_done() directly

Lee Duncan
2021-10-05T23:52:32Z

On 9/29/21 3:05 PM, Bart Van Assche wrote:
> Conditional statements are faster than indirect calls. Hence call
> scsi_done() directly.
>
> Reviewed-by: John Garry <john.garry@huawei.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/libiscsi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 712a45368385..7beedc59d0c6 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -468,7 +468,7 @@ static void iscsi_free_task(struct iscsi_task *task)
> * it will decide how to return sc to scsi-ml.
> */
> if (oldstate != ISCSI_TASK_REQUEUE_SCSIQ)
> - sc->scsi_done(sc);
> + scsi_done(sc);
> }
> }
>
> @@ -1807,7 +1807,7 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
> ISCSI_DBG_SESSION(session, "iscsi: cmd 0x%x is not queued (%d)\n",
> sc->cmnd[0], reason);
> scsi_set_resid(sc, scsi_bufflen(sc));
> - sc->scsi_done(sc);
> + scsi_done(sc);
> return 0;
> }
> EXPORT_SYMBOL_GPL(iscsi_queuecommand);
>

Reviewed-by: Lee Duncan <lduncan@suse.com>