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

Link: https://lore.kernel.org/r/20211007204618.2196847-6-bvanassche@acm.org
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/xen-scsifront.c

index 0204e31..12c10a5 100644 (file)
@@ -276,7 +276,7 @@ static void scsifront_cdb_cmd_done(struct vscsifrnt_info *info,
        if (sense_len)
                memcpy(sc->sense_buffer, ring_rsp->sense_buffer, sense_len);
 
-       sc->scsi_done(sc);
+       scsi_done(sc);
 }
 
 static void scsifront_sync_cmd_done(struct vscsifrnt_info *info,
@@ -558,7 +558,7 @@ static int scsifront_queuecommand(struct Scsi_Host *shost,
                if (err == -ENOMEM)
                        return SCSI_MLQUEUE_HOST_BUSY;
                sc->result = DID_ERROR << 16;
-               sc->scsi_done(sc);
+               scsi_done(sc);
                return 0;
        }