]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
scsi: megaraid: Declare SCSI host template const
authorBart Van Assche <bvanassche@acm.org>
Wed, 22 Mar 2023 19:54:46 +0000 (12:54 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 24 Mar 2023 23:19:57 +0000 (19:19 -0400)
Make it explicit that the SCSI host template is not modified.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-52-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid.c
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_sas_base.c

index bf491af9f0d65fc545105157dbe55f9d022211e5..3115ab991fc69c6a163feb47cfeb779f6452d154 100644 (file)
@@ -4100,7 +4100,7 @@ mega_internal_command(adapter_t *adapter, megacmd_t *mc, mega_passthru *pthru)
        return rval;
 }
 
-static struct scsi_host_template megaraid_template = {
+static const struct scsi_host_template megaraid_template = {
        .module                         = THIS_MODULE,
        .name                           = "MegaRAID",
        .proc_name                      = "megaraid_legacy",
index 132de68c14e9886077ef251a788f10a4f220e32e..ef2b6380e19a670aacfa8f4567f143c0283d4c01 100644 (file)
@@ -325,7 +325,7 @@ ATTRIBUTE_GROUPS(megaraid_sdev);
 /*
  * Scsi host template for megaraid unified driver
  */
-static struct scsi_host_template megaraid_template_g = {
+static const struct scsi_host_template megaraid_template_g = {
        .module                         = THIS_MODULE,
        .name                           = "LSI Logic MegaRAID driver",
        .proc_name                      = "megaraid",
index 3ceece9883383b78969fac6c87bcca3bbd5a61b1..406a346cbc08b5c75a1f79723112cf63a99c4c96 100644 (file)
@@ -3505,7 +3505,7 @@ ATTRIBUTE_GROUPS(megaraid_host);
 /*
  * Scsi host template for megaraid_sas driver
  */
-static struct scsi_host_template megasas_template = {
+static const struct scsi_host_template megasas_template = {
 
        .module = THIS_MODULE,
        .name = "Avago SAS based MegaRAID driver",