diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 22:29:04 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 03:31:41 +0200 |
commit | 6c2c7d6aa439e1ee0885d7c32d999df0124607d5 (patch) | |
tree | 0c29f26d2506abec5c16c951978e74ccc9f98555 /drivers/scsi | |
parent | scsi: qlogicpti: Call scsi_done() directly (diff) | |
download | linux-6c2c7d6aa439e1ee0885d7c32d999df0124607d5.tar.xz linux-6c2c7d6aa439e1ee0885d7c32d999df0124607d5.zip |
scsi: scsi_debug: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-70-bvanassche@acm.org
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 66f507469a31..407f1ce15118 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -4809,7 +4809,7 @@ static void sdebug_q_cmd_complete(struct sdebug_defer *sd_dp) pr_info("bypassing scsi_done() due to aborted cmd\n"); return; } - scp->scsi_done(scp); /* callback to mid level */ + scsi_done(scp); /* callback to mid level */ } /* When high resolution timer goes off this function is called. */ @@ -5524,7 +5524,7 @@ static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info *devip, if (new_sd_dp) kfree(sd_dp); /* call scsi_done() from this thread */ - cmnd->scsi_done(cmnd); + scsi_done(cmnd); return 0; } /* otherwise reduce kt by elapsed time */ @@ -5604,7 +5604,7 @@ respond_in_thread: /* call back to mid-layer using invocation thread */ cmnd->result &= ~SDEG_RES_IMMED_MASK; if (cmnd->result == 0 && scsi_result != 0) cmnd->result = scsi_result; - cmnd->scsi_done(cmnd); + scsi_done(cmnd); return 0; } @@ -7363,7 +7363,7 @@ static int sdebug_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num) } sd_dp->defer_t = SDEB_DEFER_NONE; spin_unlock_irqrestore(&sqp->qc_lock, iflags); - scp->scsi_done(scp); /* callback to mid level */ + scsi_done(scp); /* callback to mid level */ spin_lock_irqsave(&sqp->qc_lock, iflags); num_entries++; } |