mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
scsi: ibmvscsi: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007202923.2174984-39-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
574015a837
commit
85f6dd08c8
@ -1046,7 +1046,7 @@ static void ibmvfc_scsi_eh_done(struct ibmvfc_event *evt)
|
||||
|
||||
if (cmnd) {
|
||||
scsi_dma_unmap(cmnd);
|
||||
cmnd->scsi_done(cmnd);
|
||||
scsi_done(cmnd);
|
||||
}
|
||||
|
||||
ibmvfc_free_event(evt);
|
||||
@ -1848,7 +1848,7 @@ static void ibmvfc_scsi_done(struct ibmvfc_event *evt)
|
||||
cmnd->result = (DID_ERROR << 16);
|
||||
|
||||
scsi_dma_unmap(cmnd);
|
||||
cmnd->scsi_done(cmnd);
|
||||
scsi_done(cmnd);
|
||||
}
|
||||
|
||||
ibmvfc_free_event(evt);
|
||||
@ -1934,7 +1934,7 @@ static int ibmvfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
|
||||
if (unlikely((rc = fc_remote_port_chkready(rport))) ||
|
||||
unlikely((rc = ibmvfc_host_chkready(vhost)))) {
|
||||
cmnd->result = rc;
|
||||
cmnd->scsi_done(cmnd);
|
||||
scsi_done(cmnd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1974,7 +1974,7 @@ static int ibmvfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
|
||||
"Failed to map DMA buffer for command. rc=%d\n", rc);
|
||||
|
||||
cmnd->result = DID_ERROR << 16;
|
||||
cmnd->scsi_done(cmnd);
|
||||
scsi_done(cmnd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user