scsi: message: fusion: Declare SCSI host template members const
authorBart Van Assche <bvanassche@acm.org>
Wed, 22 Mar 2023 19:54:02 +0000 (12:54 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 24 Mar 2023 23:19:19 +0000 (19:19 -0400)
Make it explicit that the SCSI host templates are not modified.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-8-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/message/fusion/mptfc.c
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptspi.c

index fac7471092095de7edc688737a3a3afc0a8f477a..22e7779a332b7cb5a9a5ac18566e3c34c691921a 100644 (file)
@@ -105,7 +105,7 @@ static int mptfc_abort(struct scsi_cmnd *SCpnt);
 static int mptfc_dev_reset(struct scsi_cmnd *SCpnt);
 static int mptfc_bus_reset(struct scsi_cmnd *SCpnt);
 
-static struct scsi_host_template mptfc_driver_template = {
+static const struct scsi_host_template mptfc_driver_template = {
        .module                         = THIS_MODULE,
        .proc_name                      = "mptfc",
        .show_info                      = mptscsih_show_info,
index 88fe4a860ae5149bd2825f7e79889050fd9c459e..86f16f3ea47870b0763c16d1f070e48b4a1adaa5 100644 (file)
@@ -1997,7 +1997,7 @@ done:
 }
 
 
-static struct scsi_host_template mptsas_driver_template = {
+static const struct scsi_host_template mptsas_driver_template = {
        .module                         = THIS_MODULE,
        .proc_name                      = "mptsas",
        .show_info                      = mptscsih_show_info,
index 62089a8caa2f28ba15cb1148b30473c787ab8f1c..6c5920db1e9dc5838ecc0f409c4a7fdf6f363269 100644 (file)
@@ -820,7 +820,7 @@ static void mptspi_slave_destroy(struct scsi_device *sdev)
        mptscsih_slave_destroy(sdev);
 }
 
-static struct scsi_host_template mptspi_driver_template = {
+static const struct scsi_host_template mptspi_driver_template = {
        .module                         = THIS_MODULE,
        .proc_name                      = "mptspi",
        .show_info                      = mptscsih_show_info,