summaryrefslogtreecommitdiff
path: root/drivers/scsi/esp_scsi.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2022-02-18 22:50:47 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-23 05:11:04 +0300
commitdfae39874f457dde585068c33a961b10445041cf (patch)
treefec3680e9f8d1ac6ba740744bebd0423122ea3e1 /drivers/scsi/esp_scsi.c
parent9804db13d3c80eab61b3232c0b99b914b10b73b3 (diff)
downloadlinux-dfae39874f457dde585068c33a961b10445041cf.tar.xz
scsi: esp_scsi: Stop using the SCSI pointer
Set .cmd_size in the SCSI host template instead of using the SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. Link: https://lore.kernel.org/r/20220218195117.25689-20-bvanassche@acm.org Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> 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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 57787537285a..64ec6bb84550 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2678,6 +2678,7 @@ struct scsi_host_template scsi_esp_template = {
.sg_tablesize = SG_ALL,
.max_sectors = 0xffff,
.skip_settle_delay = 1,
+ .cmd_size = sizeof(struct esp_cmd_priv),
};
EXPORT_SYMBOL(scsi_esp_template);
@@ -2739,9 +2740,6 @@ static struct spi_function_template esp_transport_ops = {
static int __init esp_init(void)
{
- BUILD_BUG_ON(sizeof(struct scsi_pointer) <
- sizeof(struct esp_cmd_priv));
-
esp_transport_template = spi_attach_transport(&esp_transport_ops);
if (!esp_transport_template)
return -ENODEV;