public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	Hannes Reinecke <hare@suse.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>
Subject: [PATCH v2 34/82] scsi: esp_scsi: Declare SCSI host template const
Date: Thu,  9 Mar 2023 11:25:26 -0800	[thread overview]
Message-ID: <20230309192614.2240602-35-bvanassche@acm.org> (raw)
In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org>

Make it explicit that the SCSI host template is not modified.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/am53c974.c  | 2 +-
 drivers/scsi/esp_scsi.c  | 2 +-
 drivers/scsi/esp_scsi.h  | 2 +-
 drivers/scsi/jazz_esp.c  | 2 +-
 drivers/scsi/mac_esp.c   | 2 +-
 drivers/scsi/sun3x_esp.c | 2 +-
 drivers/scsi/sun_esp.c   | 2 +-
 drivers/scsi/zorro_esp.c | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/am53c974.c b/drivers/scsi/am53c974.c
index b69edb473295..fbb29dbb1e50 100644
--- a/drivers/scsi/am53c974.c
+++ b/drivers/scsi/am53c974.c
@@ -371,7 +371,7 @@ static void dc390_check_eeprom(struct esp *esp)
 static int pci_esp_probe_one(struct pci_dev *pdev,
 			      const struct pci_device_id *id)
 {
-	struct scsi_host_template *hostt = &scsi_esp_template;
+	const struct scsi_host_template *hostt = &scsi_esp_template;
 	int err = -ENODEV;
 	struct Scsi_Host *shost;
 	struct esp *esp;
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 64ec6bb84550..97816a0e6240 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2660,7 +2660,7 @@ static const char *esp_info(struct Scsi_Host *host)
 	return "esp";
 }
 
-struct scsi_host_template scsi_esp_template = {
+const struct scsi_host_template scsi_esp_template = {
 	.module			= THIS_MODULE,
 	.name			= "esp",
 	.info			= esp_info,
diff --git a/drivers/scsi/esp_scsi.h b/drivers/scsi/esp_scsi.h
index c73760d3cf83..00cd7c0ccc76 100644
--- a/drivers/scsi/esp_scsi.h
+++ b/drivers/scsi/esp_scsi.h
@@ -572,7 +572,7 @@ struct esp {
  * 13) Check scsi_esp_register() return value, release all resources
  *     if an error was returned.
  */
-extern struct scsi_host_template scsi_esp_template;
+extern const struct scsi_host_template scsi_esp_template;
 extern int scsi_esp_register(struct esp *);
 
 extern void scsi_esp_unregister(struct esp *);
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index 60a88a95a8e2..0c842fb29aa0 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -104,7 +104,7 @@ static const struct esp_driver_ops jazz_esp_ops = {
 
 static int esp_jazz_probe(struct platform_device *dev)
 {
-	struct scsi_host_template *tpnt = &scsi_esp_template;
+	const struct scsi_host_template *tpnt = &scsi_esp_template;
 	struct Scsi_Host *host;
 	struct esp *esp;
 	struct resource *res;
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index 6d23ab5aee56..3f0061b00494 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -289,7 +289,7 @@ static struct esp_driver_ops mac_esp_ops = {
 
 static int esp_mac_probe(struct platform_device *dev)
 {
-	struct scsi_host_template *tpnt = &scsi_esp_template;
+	const struct scsi_host_template *tpnt = &scsi_esp_template;
 	struct Scsi_Host *host;
 	struct esp *esp;
 	int err;
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c
index d3489ac7ab28..30f67cbf4a7a 100644
--- a/drivers/scsi/sun3x_esp.c
+++ b/drivers/scsi/sun3x_esp.c
@@ -169,7 +169,7 @@ static const struct esp_driver_ops sun3x_esp_ops = {
 
 static int esp_sun3x_probe(struct platform_device *dev)
 {
-	struct scsi_host_template *tpnt = &scsi_esp_template;
+	const struct scsi_host_template *tpnt = &scsi_esp_template;
 	struct Scsi_Host *host;
 	struct esp *esp;
 	struct resource *res;
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 5dc38d35745b..fb0611bfb209 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -451,7 +451,7 @@ static const struct esp_driver_ops sbus_esp_ops = {
 static int esp_sbus_probe_one(struct platform_device *op,
 			      struct platform_device *espdma, int hme)
 {
-	struct scsi_host_template *tpnt = &scsi_esp_template;
+	const struct scsi_host_template *tpnt = &scsi_esp_template;
 	struct Scsi_Host *host;
 	struct esp *esp;
 	int err;
diff --git a/drivers/scsi/zorro_esp.c b/drivers/scsi/zorro_esp.c
index 928c8adf5cb3..56cae22a4242 100644
--- a/drivers/scsi/zorro_esp.c
+++ b/drivers/scsi/zorro_esp.c
@@ -713,7 +713,7 @@ MODULE_DEVICE_TABLE(zorro, zorro_esp_zorro_tbl);
 static int zorro_esp_probe(struct zorro_dev *z,
 				       const struct zorro_device_id *ent)
 {
-	struct scsi_host_template *tpnt = &scsi_esp_template;
+	const struct scsi_host_template *tpnt = &scsi_esp_template;
 	struct Scsi_Host *host;
 	struct esp *esp;
 	const struct zorro_driver_data *zdd;

  parent reply	other threads:[~2023-03-09 19:29 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 19:24 [PATCH v2 00/82] Constify most SCSI host templates Bart Van Assche
2023-03-09 19:24 ` [PATCH v2 01/82] scsi: qla2xxx: Refer directly to the qla2xxx_driver_template Bart Van Assche
2023-03-09 19:24 ` [PATCH v2 02/82] scsi: core: Declare most SCSI host template pointers const Bart Van Assche
2023-03-09 19:24 ` [PATCH v2 03/82] scsi: core: Declare SCSI host template pointer members const Bart Van Assche
2023-03-10  9:24   ` John Garry
2023-03-09 19:24 ` [PATCH v2 04/82] ata: Declare SCSI host templates const Bart Van Assche
2023-03-09 23:36   ` Serge Semin
2023-03-10  9:17   ` John Garry
2023-03-10 14:54   ` Jon Hunter
2023-03-09 19:24 ` [PATCH v2 05/82] firewire: sbp2: Declare the SCSI host template const Bart Van Assche
2023-03-09 19:24 ` [PATCH v2 06/82] RDMA/srp: " Bart Van Assche
2023-03-13 13:03   ` Leon Romanovsky
2023-03-09 19:24 ` [PATCH v2 07/82] scsi: message: fusion: Declare SCSI host template members const Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 08/82] scsi: zfcp: Declare SCSI host template const Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 09/82] scsi: 3w-9xxx: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 10/82] scsi: 3w-sas: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 11/82] scsi: 3w-xxxx: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 12/82] scsi: BusLogic: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 13/82] scsi: a100u2w: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 14/82] scsi: a2091: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 15/82] scsi: a3000: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 16/82] scsi: aacraid: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 17/82] scsi: advansys: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 18/82] scsi: aha152x: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 19/82] scsi: aha1542: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 20/82] scsi: aic94xx: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 21/82] scsi: arcmsr: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 22/82] scsi: acornscsi: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 23/82] scsi: arxescsi: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 24/82] scsi: aha1740: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 25/82] scsi: cumana: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 26/82] scsi: eesox: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 27/82] scsi: oak: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 28/82] scsi: powertec: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 29/82] scsi: atp870u: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 30/82] scsi: dc395x: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 31/82] scsi: dmx3191d: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 32/82] scsi: elx: efct: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 33/82] scsi: esas2r: " Bart Van Assche
2023-03-09 19:25 ` Bart Van Assche [this message]
2023-03-09 19:25 ` [PATCH v2 35/82] scsi: fcoe: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 36/82] scsi: fnic: Declare " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 37/82] scsi: qedf: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 38/82] scsi: fdomain: Declare SCSI " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 39/82] scsi: NCR5380: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 40/82] scsi: gvp11: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 41/82] scsi: hisi_sas: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 42/82] scsi: hpsa: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 43/82] scsi: hptiop: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 44/82] scsi: ibmvfc: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 45/82] scsi: imm: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 46/82] scsi: initio: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 47/82] scsi: ipr: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 48/82] scsi: isci: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 49/82] scsi: iscsi: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 50/82] scsi: mac53c94: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 51/82] scsi: mac_scsi: " Bart Van Assche
2023-03-10  4:46   ` Finn Thain
2023-03-10  6:09     ` Michael Schmitz
2023-03-10 18:28       ` Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 52/82] scsi: megaraid: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 53/82] scsi: mesh: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 54/82] scsi: mpi3mr: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 55/82] scsi: mpt3sas: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 56/82] scsi: mvme147: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 57/82] scsi: mvsas: " Bart Van Assche
2023-03-10  9:17   ` John Garry
2023-03-09 19:25 ` [PATCH v2 58/82] scsi: mvumi: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 59/82] scsi: myrb: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 60/82] scsi: myrs: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 61/82] scsi: nsp32: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 62/82] scsi: pcmcia-sym53c500: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 63/82] scsi: pcmcia-pm8001: " Bart Van Assche
2023-03-10  6:31   ` Jinpu Wang
2023-03-09 19:25 ` [PATCH v2 64/82] scsi: pmcraid: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 65/82] scsi: ppa: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 66/82] scsi: ps3rom: " Bart Van Assche
2023-03-09 19:25 ` [PATCH v2 67/82] scsi: qla1280: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 68/82] scsi: qla2xxx: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 69/82] scsi: qlogicpti: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 70/82] scsi: sgiwd93: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 71/82] scsi: smartpqi: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 72/82] scsi: snic: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 73/82] scsi: stex: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 74/82] scsi: sym53c8xx: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 75/82] scsi: virtio-scsi: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 76/82] scsi: wd719x: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 77/82] scsi: xen-scsifront: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 78/82] scsi: rts5208: " Bart Van Assche
2023-03-10  7:32   ` Greg Kroah-Hartman
2023-03-09 19:26 ` [PATCH v2 79/82] scsi: target: tcm-loop: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 80/82] scsi: ufs: " Bart Van Assche
2023-03-09 19:26 ` [PATCH v2 81/82] usb: uas: Declare two host templates and host template pointers const Bart Van Assche
2023-03-10  7:13   ` Greg Kroah-Hartman
2023-03-09 19:26 ` [PATCH v2 82/82] scsi: core: Update a source code comment Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230309192614.2240602-35-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox