scsi: qla4xxx: Call scsi_done() directly
authorBart Van Assche <bvanassche@acm.org>
Thu, 7 Oct 2021 20:29:01 +0000 (13:29 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 17 Oct 2021 01:31:41 +0000 (21:31 -0400)
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-67-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla4xxx/ql4_os.c

index f1ea65c..76d0b59 100644 (file)
@@ -4080,7 +4080,7 @@ void qla4xxx_srb_compl(struct kref *ref)
 
        mempool_free(srb, ha->srb_mempool);
 
-       cmd->scsi_done(cmd);
+       scsi_done(cmd);
 }
 
 /**
@@ -4154,7 +4154,7 @@ qc_host_busy:
        return SCSI_MLQUEUE_HOST_BUSY;
 
 qc_fail_command:
-       cmd->scsi_done(cmd);
+       scsi_done(cmd);
 
        return 0;
 }