diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 13:28:22 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-16 21:28:46 -0400 |
commit | e82d6b179b142411c19a65bed881e148dc79bfa6 (patch) | |
tree | beeb69241f8115d933ee3209f784e5d3c673e807 /drivers/scsi/cxlflash | |
parent | 0979e265e4b7e454dd240063d06d0444fb8d3259 (diff) |
scsi: cxlflash: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-28-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxlflash')
-rw-r--r-- | drivers/scsi/cxlflash/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index b2730e859df8..2943cdd83614 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -171,7 +171,7 @@ static void cmd_complete(struct afu_cmd *cmd) dev_dbg_ratelimited(dev, "%s:scp=%p result=%08x ioasc=%08x\n", __func__, scp, scp->result, cmd->sa.ioasc); - scp->scsi_done(scp); + scsi_done(scp); } else if (cmd->cmd_tmf) { spin_lock_irqsave(&cfg->tmf_slock, lock_flags); cfg->tmf_active = false; @@ -205,7 +205,7 @@ static void flush_pending_cmds(struct hwq *hwq) if (cmd->scp) { scp = cmd->scp; scp->result = (DID_IMM_RETRY << 16); - scp->scsi_done(scp); + scsi_done(scp); } else { cmd->cmd_aborted = true; @@ -601,7 +601,7 @@ static int cxlflash_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scp) case STATE_FAILTERM: dev_dbg_ratelimited(dev, "%s: device has failed\n", __func__); scp->result = (DID_NO_CONNECT << 16); - scp->scsi_done(scp); + scsi_done(scp); rc = 0; goto out; default: |