diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 22:28:55 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 03:31:40 +0200 |
commit | f13cc234bec93959d49b7db9e63f74272b282e5c (patch) | |
tree | 209ae4dfa46b7f065043470d51af07df4e039a6e /drivers/scsi/pmcraid.c | |
parent | scsi: pcmcia: Call scsi_done() directly (diff) | |
download | linux-f13cc234bec93959d49b7db9e63f74272b282e5c.tar.xz linux-f13cc234bec93959d49b7db9e63f74272b282e5c.zip |
scsi: pmcraid: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-61-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/pmcraid.c')
-rw-r--r-- | drivers/scsi/pmcraid.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index bffd9a9349e7..11f36fd4e62f 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -837,7 +837,7 @@ static void pmcraid_erp_done(struct pmcraid_cmd *cmd) scsi_dma_unmap(scsi_cmd); pmcraid_return_cmd(cmd); - scsi_cmd->scsi_done(scsi_cmd); + scsi_done(scsi_cmd); } /** @@ -2017,7 +2017,7 @@ static void pmcraid_fail_outstanding_cmds(struct pmcraid_instance *pinstance) le32_to_cpu(resp) >> 2, cmd->ioa_cb->ioarcb.cdb[0], scsi_cmd->result); - scsi_cmd->scsi_done(scsi_cmd); + scsi_done(scsi_cmd); } else if (cmd->cmd_done == pmcraid_internal_done || cmd->cmd_done == pmcraid_erp_done) { cmd->cmd_done(cmd); @@ -2814,7 +2814,7 @@ static int _pmcraid_io_done(struct pmcraid_cmd *cmd, int reslen, int ioasc) if (rc == 0) { scsi_dma_unmap(scsi_cmd); - scsi_cmd->scsi_done(scsi_cmd); + scsi_done(scsi_cmd); } return rc; @@ -3328,7 +3328,6 @@ static int pmcraid_queuecommand_lck( pinstance = (struct pmcraid_instance *)scsi_cmd->device->host->hostdata; fw_version = be16_to_cpu(pinstance->inq_data->fw_version); - scsi_cmd->scsi_done = done; res = scsi_cmd->device->hostdata; scsi_cmd->result = (DID_OK << 16); @@ -3338,7 +3337,7 @@ static int pmcraid_queuecommand_lck( if (pinstance->ioa_state == IOA_STATE_DEAD) { pmcraid_info("IOA is dead, but queuecommand is scheduled\n"); scsi_cmd->result = (DID_NO_CONNECT << 16); - scsi_cmd->scsi_done(scsi_cmd); + scsi_done(scsi_cmd); return 0; } @@ -3351,7 +3350,7 @@ static int pmcraid_queuecommand_lck( */ if (scsi_cmd->cmnd[0] == SYNCHRONIZE_CACHE) { pmcraid_info("SYNC_CACHE(0x35), completing in driver itself\n"); - scsi_cmd->scsi_done(scsi_cmd); + scsi_done(scsi_cmd); return 0; } |