diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 22:46:01 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 03:31:42 +0200 |
commit | 35c3730a965722e1b6b13539b9d4fab8116554b5 (patch) | |
tree | f91c5dec27592dff5cffa8f40ac4a0b855a7e1d4 /drivers/scsi/ufs/ufshcd.c | |
parent | scsi: sym53c8xx_2: Call scsi_done() directly (diff) | |
download | linux-35c3730a965722e1b6b13539b9d4fab8116554b5.tar.xz linux-35c3730a965722e1b6b13539b9d4fab8116554b5.zip |
scsi: ufs: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007204618.2196847-1-bvanassche@acm.org
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/ufs/ufshcd.c')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index f871f74fd59e..10f5805ae3f6 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2714,7 +2714,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) if (hba->pm_op_in_progress) { hba->force_reset = true; set_host_byte(cmd, DID_BAD_TARGET); - cmd->scsi_done(cmd); + scsi_done(cmd); goto out; } fallthrough; @@ -2723,7 +2723,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) goto out; case UFSHCD_STATE_ERROR: set_host_byte(cmd, DID_ERROR); - cmd->scsi_done(cmd); + scsi_done(cmd); goto out; } @@ -5275,7 +5275,7 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba, /* Mark completed command as NULL in LRB */ lrbp->cmd = NULL; /* Do not touch lrbp after scsi done */ - cmd->scsi_done(cmd); + scsi_done(cmd); ufshcd_release(hba); update_scaling = true; } else if (lrbp->command_type == UTP_CMD_TYPE_DEV_MANAGE || |