Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: hptiop: 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.

Rename hpt_scsi_pointer into hpt_cmd_priv because that data structure is
not related to struct scsi_pointer.

Link: https://lore.kernel.org/r/20220218195117.25689-24-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
5c113eb3 924cb24d

+3 -2
+1
drivers/scsi/hptiop.c
··· 1174 1174 .slave_configure = hptiop_slave_config, 1175 1175 .this_id = -1, 1176 1176 .change_queue_depth = hptiop_adjust_disk_queue_depth, 1177 + .cmd_size = sizeof(struct hpt_cmd_priv), 1177 1178 }; 1178 1179 1179 1180 static int hptiop_internal_memalloc_itl(struct hptiop_hba *hba)
+2 -2
drivers/scsi/hptiop.h
··· 251 251 int index; 252 252 }; 253 253 254 - struct hpt_scsi_pointer { 254 + struct hpt_cmd_priv { 255 255 int mapped; 256 256 int sgcnt; 257 257 dma_addr_t dma_handle; 258 258 }; 259 259 260 - #define HPT_SCP(scp) ((struct hpt_scsi_pointer *)&(scp)->SCp) 260 + #define HPT_SCP(scp) ((struct hpt_cmd_priv *)scsi_cmd_priv(scp)) 261 261 262 262 enum hptiop_family { 263 263 UNKNOWN_BASED_IOP,