diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 23:28:26 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-17 04:28:46 +0300 |
commit | f8ab27d9649440a4fa6e77bbea939a62fd44df27 (patch) | |
tree | 1945da51920a92092f9f9091d17d8dd9564b8925 /drivers/scsi/esp_scsi.c | |
parent | 52e65d1c25a6f22f08934878df737a6239f22d48 (diff) | |
download | linux-f8ab27d9649440a4fa6e77bbea939a62fd44df27.tar.xz |
scsi: esp_scsi: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link: https://lore.kernel.org/r/20211007202923.2174984-32-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/esp_scsi.c')
-rw-r--r-- | drivers/scsi/esp_scsi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 9a8c037a2f21..f7c2d64f1cef 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -936,7 +936,7 @@ static void esp_cmd_is_done(struct esp *esp, struct esp_cmd_entry *ent, } } - cmd->scsi_done(cmd); + scsi_done(cmd); list_del(&ent->list); esp_put_ent(esp, ent); @@ -965,8 +965,6 @@ static int esp_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_ ent->cmd = cmd; - cmd->scsi_done = done; - spriv = ESP_CMD_PRIV(cmd); spriv->num_sg = 0; @@ -2038,7 +2036,7 @@ static void esp_reset_cleanup_one(struct esp *esp, struct esp_cmd_entry *ent) if (ent->flags & ESP_CMD_FLAG_AUTOSENSE) esp_unmap_sense(esp, ent); - cmd->scsi_done(cmd); + scsi_done(cmd); list_del(&ent->list); esp_put_ent(esp, ent); } @@ -2061,7 +2059,7 @@ static void esp_reset_cleanup(struct esp *esp) list_del(&ent->list); cmd->result = DID_RESET << 16; - cmd->scsi_done(cmd); + scsi_done(cmd); esp_put_ent(esp, ent); } @@ -2535,7 +2533,7 @@ static int esp_eh_abort_handler(struct scsi_cmnd *cmd) list_del(&ent->list); cmd->result = DID_ABORT << 16; - cmd->scsi_done(cmd); + scsi_done(cmd); esp_put_ent(esp, ent); |