Re: [PATCH v2 33/44] nsp_cs: Move the SCSI pointer to private command data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/8/22 18:25, Bart Van Assche wrote:
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
in struct scsi_cmnd.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.

Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
  drivers/scsi/pcmcia/nsp_cs.c    | 206 ++++++++++++++++++--------------
  drivers/scsi/pcmcia/nsp_cs.h    |   2 +-
  drivers/scsi/pcmcia/nsp_debug.c |   2 +-
  3 files changed, 120 insertions(+), 90 deletions(-)

diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index dcffda384eaf..94d8185d3190 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -70,6 +70,17 @@ static bool       free_ports = 0;
  module_param(free_ports, bool, 0);
  MODULE_PARM_DESC(free_ports, "Release IO ports after configuration? (default: 0 (=no))");
+struct nsp_cmd_priv {
+	struct scsi_pointer scsi_pointer;
+};
+
+static struct scsi_pointer *nsp_priv(struct scsi_cmnd *cmd)
+{
+	struct nsp_cmd_priv *ncmd = scsi_cmd_priv(cmd);
+
+	return &ncmd->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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux