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

scsi: vmw_pvscsi: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007204618.2196847-3-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b4194fcb
...@@ -643,7 +643,7 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter, ...@@ -643,7 +643,7 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
"cmd=%p %x ctx=%p result=0x%x status=0x%x,%x\n", "cmd=%p %x ctx=%p result=0x%x status=0x%x,%x\n",
cmd, cmd->cmnd[0], ctx, cmd->result, btstat, sdstat); cmd, cmd->cmnd[0], ctx, cmd->result, btstat, sdstat);
cmd->scsi_done(cmd); scsi_done(cmd);
} }
/* /*
...@@ -786,7 +786,6 @@ static int pvscsi_queue_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd ...@@ -786,7 +786,6 @@ static int pvscsi_queue_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
} }
cmd->scsi_done = done;
op = cmd->cmnd[0]; op = cmd->cmnd[0];
dev_dbg(&cmd->device->sdev_gendev, dev_dbg(&cmd->device->sdev_gendev,
...@@ -860,7 +859,7 @@ static int pvscsi_abort(struct scsi_cmnd *cmd) ...@@ -860,7 +859,7 @@ static int pvscsi_abort(struct scsi_cmnd *cmd)
* Successfully aborted the command. * Successfully aborted the command.
*/ */
cmd->result = (DID_ABORT << 16); cmd->result = (DID_ABORT << 16);
cmd->scsi_done(cmd); scsi_done(cmd);
out: out:
spin_unlock_irqrestore(&adapter->hw_lock, flags); spin_unlock_irqrestore(&adapter->hw_lock, flags);
...@@ -887,7 +886,7 @@ static void pvscsi_reset_all(struct pvscsi_adapter *adapter) ...@@ -887,7 +886,7 @@ static void pvscsi_reset_all(struct pvscsi_adapter *adapter)
pvscsi_patch_sense(cmd); pvscsi_patch_sense(cmd);
pvscsi_release_context(adapter, ctx); pvscsi_release_context(adapter, ctx);
cmd->result = (DID_RESET << 16); cmd->result = (DID_RESET << 16);
cmd->scsi_done(cmd); scsi_done(cmd);
} }
} }
} }
......
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