Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/scsi/myrs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index 07f274afd7e5..2ffe3cadda66 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -1595,14 +1595,14 @@ static int myrs_queuecommand(struct Scsi_Host *shost, if (!scmd->device->hostdata) { scmd->result = (DID_NO_CONNECT << 16); - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } switch (scmd->cmnd[0]) { case REPORT_LUNS: scsi_build_sense(scmd, 0, ILLEGAL_REQUEST, 0x20, 0x0); - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; case MODE_SENSE: if (scmd->device->channel >= cs->ctlr_info->physchan_present) { @@ -1616,7 +1616,7 @@ static int myrs_queuecommand(struct Scsi_Host *shost, myrs_mode_sense(cs, scmd, ldev_info); scmd->result = (DID_OK << 16); } - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } break; @@ -1756,7 +1756,7 @@ static int myrs_queuecommand(struct Scsi_Host *shost, if (WARN_ON(!hw_sgl)) { scsi_dma_unmap(scmd); scmd->result = (DID_ERROR << 16); - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } hw_sgl->sge_addr = (u64)sg_dma_address(sgl); @@ -2083,7 +2083,7 @@ static void myrs_handle_scsi(struct myrs_hba *cs, struct myrs_cmdblk *cmd_blk, scmd->result = (DID_BAD_TARGET << 16); else scmd->result = (DID_OK << 16) | status; - scmd->scsi_done(scmd); + scsi_done(scmd); } static void myrs_handle_cmdblk(struct myrs_hba *cs, struct myrs_cmdblk *cmd_blk)