Commit fd17badb authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: xen-scsifront: Call scsi_done() directly

Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007204618.2196847-6-bvanassche@acm.orgReviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f11e4da6
...@@ -276,7 +276,7 @@ static void scsifront_cdb_cmd_done(struct vscsifrnt_info *info, ...@@ -276,7 +276,7 @@ static void scsifront_cdb_cmd_done(struct vscsifrnt_info *info,
if (sense_len) if (sense_len)
memcpy(sc->sense_buffer, ring_rsp->sense_buffer, 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, static void scsifront_sync_cmd_done(struct vscsifrnt_info *info,
...@@ -558,7 +558,7 @@ static int scsifront_queuecommand(struct Scsi_Host *shost, ...@@ -558,7 +558,7 @@ static int scsifront_queuecommand(struct Scsi_Host *shost,
if (err == -ENOMEM) if (err == -ENOMEM)
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
sc->result = DID_ERROR << 16; sc->result = DID_ERROR << 16;
sc->scsi_done(sc); scsi_done(sc);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment