diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 13:28:04 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-16 21:28:44 -0400 |
commit | 2adf975e899a35936b89047d3a02c582ef11adeb (patch) | |
tree | 720917b660ede94ca5c2392fbe7447b605db43b7 /drivers/scsi/3w-sas.c | |
parent | 3e6d3832dc1b4d6426733b357412a96f90b0e368 (diff) | |
download | linux-2adf975e899a35936b89047d3a02c582ef11adeb.tar.bz2 |
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.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/3w-sas.c')
-rw-r--r-- | drivers/scsi/3w-sas.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index 4fde39da54e4..e6f51904f5b1 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c @@ -1216,7 +1216,7 @@ static irqreturn_t twl_interrupt(int irq, void *dev_instance) /* Now complete the io */ scsi_dma_unmap(cmd); - cmd->scsi_done(cmd); + scsi_done(cmd); tw_dev->state[request_id] = TW_S_COMPLETED; twl_free_request_id(tw_dev, request_id); tw_dev->posted_request_count--; @@ -1369,7 +1369,7 @@ static int twl_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res if (cmd) { cmd->result = (DID_RESET << 16); 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_ goto out; } - /* Save done function into scsi_cmnd struct */ - SCpnt->scsi_done = done; - /* Get a free request id */ twl_get_request_id(tw_dev, &request_id); |