Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
0800a26a 656f26ad

+4 -5
+4 -5
drivers/scsi/BusLogic.c
··· 2624 2624 command->reset_chain; 2625 2625 command->reset_chain = NULL; 2626 2626 command->result = DID_RESET << 16; 2627 - command->scsi_done(command); 2627 + scsi_done(command); 2628 2628 command = nxt_cmd; 2629 2629 } 2630 2630 #endif ··· 2641 2641 blogic_dealloc_ccb(ccb, 1); 2642 2642 adapter->active_cmds[tgt_id]--; 2643 2643 command->result = DID_RESET << 16; 2644 - command->scsi_done(command); 2644 + scsi_done(command); 2645 2645 } 2646 2646 adapter->bdr_pend[tgt_id] = NULL; 2647 2647 } else { ··· 2713 2713 /* 2714 2714 Call the SCSI Command Completion Routine. 2715 2715 */ 2716 - command->scsi_done(command); 2716 + scsi_done(command); 2717 2717 } 2718 2718 } 2719 2719 adapter->processing_ccbs = false; ··· 3038 3038 return SCSI_MLQUEUE_HOST_BUSY; 3039 3039 } 3040 3040 ccb->sensedata = sense_buf; 3041 - command->scsi_done = comp_cb; 3042 3041 if (blogic_multimaster_type(adapter)) { 3043 3042 /* 3044 3043 Place the CCB in an Outgoing Mailbox. The higher levels ··· 3059 3060 blogic_warn("Still unable to write Outgoing Mailbox - Host Adapter Dead?\n", adapter); 3060 3061 blogic_dealloc_ccb(ccb, 1); 3061 3062 command->result = DID_ERROR << 16; 3062 - command->scsi_done(command); 3063 + scsi_done(command); 3063 3064 } 3064 3065 } 3065 3066 } else {