Commit 1c21a4f4 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

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.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 0061e3f5
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment