diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-07 13:46:11 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-16 21:31:43 -0400 |
commit | 11b68e36b16752ae3a48dc16229958ebc9bb324a (patch) | |
tree | 68983e3b0ee7514f52a56250d7b6a594151452ec /include/scsi | |
parent | 46c97948e9b5bc8b67fd72741a2fe723ac1d14d7 (diff) | |
download | linux-rpi-11b68e36b16752ae3a48dc16229958ebc9bb324a.tar.gz linux-rpi-11b68e36b16752ae3a48dc16229958ebc9bb324a.tar.bz2 linux-rpi-11b68e36b16752ae3a48dc16229958ebc9bb324a.zip |
scsi: core: Call scsi_done directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly. Since this patch removes the last user of the
scsi_done member, also remove that data structure member.
Link: https://lore.kernel.org/r/20211007204618.2196847-11-bvanassche@acm.org
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 4edaadc293a7..7958a604f979 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -123,10 +123,6 @@ struct scsi_cmnd { * command (auto-sense). Length must be * SCSI_SENSE_BUFFERSIZE bytes. */ - /* Low-level done function - can be used by low-level driver to point - * to completion function. Not used by mid/upper level code. */ - void (*scsi_done) (struct scsi_cmnd *); - /* * The following fields can be written to by the host specific code. * Everything else should be left alone. diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index bc9c45ced145..04e9b821c0c7 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -516,7 +516,7 @@ struct scsi_host_template { unsigned long irq_flags; \ int rc; \ spin_lock_irqsave(shost->host_lock, irq_flags); \ - rc = func_name##_lck (cmd, cmd->scsi_done); \ + rc = func_name##_lck(cmd, scsi_done); \ spin_unlock_irqrestore(shost->host_lock, irq_flags); \ return rc; \ } |