From dfae39874f457dde585068c33a961b10445041cf Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 18 Feb 2022 11:50:47 -0800 Subject: 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 Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/scsi/esp_scsi.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/esp_scsi.h') diff --git a/drivers/scsi/esp_scsi.h b/drivers/scsi/esp_scsi.h index 446a3d18c022..c73760d3cf83 100644 --- a/drivers/scsi/esp_scsi.h +++ b/drivers/scsi/esp_scsi.h @@ -262,7 +262,8 @@ struct esp_cmd_priv { struct scatterlist *cur_sg; int tot_residue; }; -#define ESP_CMD_PRIV(CMD) ((struct esp_cmd_priv *)(&(CMD)->SCp)) + +#define ESP_CMD_PRIV(cmd) ((struct esp_cmd_priv *)scsi_cmd_priv(cmd)) /* NOTE: this enum is ordered based on chip features! */ enum esp_rev { -- cgit