Commit 4acf838e authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: stex: Call scsi_done() directly

Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-73-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 70a5caf1
...@@ -574,7 +574,7 @@ static void return_abnormal_state(struct st_hba *hba, int status) ...@@ -574,7 +574,7 @@ static void return_abnormal_state(struct st_hba *hba, int status)
if (ccb->cmd) { if (ccb->cmd) {
scsi_dma_unmap(ccb->cmd); scsi_dma_unmap(ccb->cmd);
ccb->cmd->result = status << 16; ccb->cmd->result = status << 16;
ccb->cmd->scsi_done(ccb->cmd); scsi_done(ccb->cmd);
ccb->cmd = NULL; ccb->cmd = NULL;
} }
} }
...@@ -688,8 +688,6 @@ stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) ...@@ -688,8 +688,6 @@ stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
break; break;
} }
cmd->scsi_done = done;
tag = scsi_cmd_to_rq(cmd)->tag; tag = scsi_cmd_to_rq(cmd)->tag;
if (unlikely(tag >= host->can_queue)) if (unlikely(tag >= host->can_queue))
...@@ -764,7 +762,7 @@ static void stex_scsi_done(struct st_ccb *ccb) ...@@ -764,7 +762,7 @@ static void stex_scsi_done(struct st_ccb *ccb)
} }
cmd->result = result; cmd->result = result;
cmd->scsi_done(cmd); scsi_done(cmd);
} }
static void stex_copy_data(struct st_ccb *ccb, static void stex_copy_data(struct st_ccb *ccb,
......
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