Commit 0800a26a authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: BusLogic: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-13-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 656f26ad
...@@ -2624,7 +2624,7 @@ static void blogic_process_ccbs(struct blogic_adapter *adapter) ...@@ -2624,7 +2624,7 @@ static void blogic_process_ccbs(struct blogic_adapter *adapter)
command->reset_chain; command->reset_chain;
command->reset_chain = NULL; command->reset_chain = NULL;
command->result = DID_RESET << 16; command->result = DID_RESET << 16;
command->scsi_done(command); scsi_done(command);
command = nxt_cmd; command = nxt_cmd;
} }
#endif #endif
...@@ -2641,7 +2641,7 @@ static void blogic_process_ccbs(struct blogic_adapter *adapter) ...@@ -2641,7 +2641,7 @@ static void blogic_process_ccbs(struct blogic_adapter *adapter)
blogic_dealloc_ccb(ccb, 1); blogic_dealloc_ccb(ccb, 1);
adapter->active_cmds[tgt_id]--; adapter->active_cmds[tgt_id]--;
command->result = DID_RESET << 16; command->result = DID_RESET << 16;
command->scsi_done(command); scsi_done(command);
} }
adapter->bdr_pend[tgt_id] = NULL; adapter->bdr_pend[tgt_id] = NULL;
} else { } else {
...@@ -2713,7 +2713,7 @@ static void blogic_process_ccbs(struct blogic_adapter *adapter) ...@@ -2713,7 +2713,7 @@ static void blogic_process_ccbs(struct blogic_adapter *adapter)
/* /*
Call the SCSI Command Completion Routine. Call the SCSI Command Completion Routine.
*/ */
command->scsi_done(command); scsi_done(command);
} }
} }
adapter->processing_ccbs = false; adapter->processing_ccbs = false;
...@@ -3038,7 +3038,6 @@ static int blogic_qcmd_lck(struct scsi_cmnd *command, ...@@ -3038,7 +3038,6 @@ static int blogic_qcmd_lck(struct scsi_cmnd *command,
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
} }
ccb->sensedata = sense_buf; ccb->sensedata = sense_buf;
command->scsi_done = comp_cb;
if (blogic_multimaster_type(adapter)) { if (blogic_multimaster_type(adapter)) {
/* /*
Place the CCB in an Outgoing Mailbox. The higher levels Place the CCB in an Outgoing Mailbox. The higher levels
...@@ -3060,7 +3059,7 @@ static int blogic_qcmd_lck(struct scsi_cmnd *command, ...@@ -3060,7 +3059,7 @@ static int blogic_qcmd_lck(struct scsi_cmnd *command,
blogic_warn("Still unable to write Outgoing Mailbox - Host Adapter Dead?\n", adapter); blogic_warn("Still unable to write Outgoing Mailbox - Host Adapter Dead?\n", adapter);
blogic_dealloc_ccb(ccb, 1); blogic_dealloc_ccb(ccb, 1);
command->result = DID_ERROR << 16; command->result = DID_ERROR << 16;
command->scsi_done(command); scsi_done(command);
} }
} }
} else { } else {
......
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