summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2021-10-07 22:46:11 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-10-17 03:31:43 +0200
commit11b68e36b16752ae3a48dc16229958ebc9bb324a (patch)
tree68983e3b0ee7514f52a56250d7b6a594151452ec /drivers/scsi/scsi_lib.c
parentscsi: usb: Call scsi_done() directly (diff)
downloadlinux-11b68e36b16752ae3a48dc16229958ebc9bb324a.tar.xz
linux-11b68e36b16752ae3a48dc16229958ebc9bb324a.zip
scsi: core: Call scsi_done directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Since this patch removes the last user of the scsi_done member, also remove that data structure member. Link: https://lore.kernel.org/r/20211007204618.2196847-11-bvanassche@acm.org Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Reviewed-by: Bean Huo <beanhuo@micron.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/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index f690a2da21ea..d0b7c6dc74f8 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1520,7 +1520,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
return rtn;
done:
- cmd->scsi_done(cmd);
+ scsi_done(cmd);
return 0;
}
@@ -1694,7 +1694,6 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
scsi_set_resid(cmd, 0);
memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
cmd->submitter = SUBMITTED_BY_BLOCK_LAYER;
- cmd->scsi_done = scsi_done;
blk_mq_start_request(req);
reason = scsi_dispatch_cmd(cmd);