diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 13:28:17 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-16 21:28:45 -0400 |
commit | 3f0b59b6852d69a27c7c32cfd8c78b26a8207d0a (patch) | |
tree | 7d1bdedde4fd3ca30ef33a5f6ce1a079aced8380 /drivers/scsi/arcmsr | |
parent | 07ebbc3a806701d1d639d94b79cf4df54e4f407e (diff) | |
download | linux-3f0b59b6852d69a27c7c32cfd8c78b26a8207d0a.tar.gz |
scsi: arcmsr: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-23-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/arcmsr')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_hba.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index ec1a834c922d..e2692ca87a6e 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -1318,7 +1318,7 @@ static void arcmsr_ccb_complete(struct CommandControlBlock *ccb) spin_lock_irqsave(&acb->ccblist_lock, flags); list_add_tail(&ccb->list, &acb->ccb_free_list); spin_unlock_irqrestore(&acb->ccblist_lock, flags); - pcmd->scsi_done(pcmd); + scsi_done(pcmd); } static void arcmsr_report_sense_info(struct CommandControlBlock *ccb) @@ -1598,7 +1598,7 @@ static void arcmsr_remove_scsi_devices(struct AdapterControlBlock *acb) if (ccb->startdone == ARCMSR_CCB_START) { ccb->pcmd->result = DID_NO_CONNECT << 16; arcmsr_pci_unmap_dma(ccb); - ccb->pcmd->scsi_done(ccb->pcmd); + scsi_done(ccb->pcmd); } } for (target = 0; target < ARCMSR_MAX_TARGETID; target++) { @@ -3192,7 +3192,7 @@ static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb, if (cmd->device->lun) { cmd->result = (DID_TIME_OUT << 16); - cmd->scsi_done(cmd); + scsi_done(cmd); return; } inqdata[0] = TYPE_PROCESSOR; @@ -3216,18 +3216,18 @@ static void arcmsr_handle_virtual_command(struct AdapterControlBlock *acb, sg = scsi_sglist(cmd); kunmap_atomic(buffer - sg->offset); - cmd->scsi_done(cmd); + scsi_done(cmd); } break; case WRITE_BUFFER: case READ_BUFFER: { if (arcmsr_iop_message_xfer(acb, cmd)) cmd->result = (DID_ERROR << 16); - cmd->scsi_done(cmd); + scsi_done(cmd); } break; default: - cmd->scsi_done(cmd); + scsi_done(cmd); } } @@ -3241,10 +3241,9 @@ static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd, if (acb->acb_flags & ACB_F_ADAPTER_REMOVED) { cmd->result = (DID_NO_CONNECT << 16); - cmd->scsi_done(cmd); + scsi_done(cmd); return 0; } - cmd->scsi_done = done; cmd->host_scribble = NULL; cmd->result = 0; if (target == 16) { @@ -3257,7 +3256,7 @@ static int arcmsr_queue_command_lck(struct scsi_cmnd *cmd, return SCSI_MLQUEUE_HOST_BUSY; if (arcmsr_build_ccb( acb, ccb, cmd ) == FAILED) { cmd->result = (DID_ERROR << 16) | SAM_STAT_RESERVATION_CONFLICT; - cmd->scsi_done(cmd); + scsi_done(cmd); return 0; } arcmsr_post_ccb(acb, ccb); |