On 2/8/22 18:25, Bart Van Assche wrote:
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.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
drivers/scsi/ppa.c | 81 ++++++++++++++++++++++++++++------------------
1 file changed, 49 insertions(+), 32 deletions(-)
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index 003043de23a5..ac948768eba4 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -45,6 +45,17 @@ typedef struct {
#include "ppa.h"
+struct ppa_cmd_priv {
+ struct scsi_pointer scsi_pointer;
+};
+
+static struct scsi_pointer *ppa_scsi_pointer(struct scsi_cmnd *cmd)
+{
+ struct ppa_cmd_priv *pcmd = scsi_cmd_priv(cmd);
+
+ return &pcmd->scsi_pointer;
+}
+
Same here: please use 'struct scsi_pointer' directly.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer