diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 23:28:50 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 04:29:16 +0300 |
commit | 1c21a4f495cfb0a0d7f6c6c6fb36df849ccd3816 (patch) | |
tree | 9185d8b18bcdb27303f1ce8e04041b5daabdddc9 /drivers/scsi/myrs.c | |
parent | 0061e3f5e0c23383e5c7e62b4e6bf4bc5b05004e (diff) | |
download | linux-1c21a4f495cfb0a0d7f6c6c6fb36df849ccd3816.tar.xz |
scsi: myrs: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-56-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/myrs.c')
-rw-r--r-- | drivers/scsi/myrs.c | 10 |
1 files 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) |