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

scsi: 3w-sas: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-10-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3e6d3832
...@@ -1216,7 +1216,7 @@ static irqreturn_t twl_interrupt(int irq, void *dev_instance) ...@@ -1216,7 +1216,7 @@ static irqreturn_t twl_interrupt(int irq, void *dev_instance)
/* Now complete the io */ /* Now complete the io */
scsi_dma_unmap(cmd); scsi_dma_unmap(cmd);
cmd->scsi_done(cmd); scsi_done(cmd);
tw_dev->state[request_id] = TW_S_COMPLETED; tw_dev->state[request_id] = TW_S_COMPLETED;
twl_free_request_id(tw_dev, request_id); twl_free_request_id(tw_dev, request_id);
tw_dev->posted_request_count--; tw_dev->posted_request_count--;
...@@ -1369,7 +1369,7 @@ static int twl_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res ...@@ -1369,7 +1369,7 @@ static int twl_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res
if (cmd) { if (cmd) {
cmd->result = (DID_RESET << 16); cmd->result = (DID_RESET << 16);
scsi_dma_unmap(cmd); scsi_dma_unmap(cmd);
cmd->scsi_done(cmd); scsi_done(cmd);
} }
} }
} }
...@@ -1461,9 +1461,6 @@ static int twl_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_ ...@@ -1461,9 +1461,6 @@ static int twl_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
goto out; goto out;
} }
/* Save done function into scsi_cmnd struct */
SCpnt->scsi_done = done;
/* Get a free request id */ /* Get a free request id */
twl_get_request_id(tw_dev, &request_id); twl_get_request_id(tw_dev, &request_id);
......
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