scsi: ata: Declare SCSI host templates const

Make it explicit that ATA host templates are not modified.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com> (for DWC AHCI SATA)
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com> (for Tegra)
Cc: Christoph Hellwig <hch@lst.de>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-5-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bart Van Assche
2023-03-24 19:19:19 -04:00
committed by Martin K. Petersen
parent e0d3f2c694
commit 25df73d933
111 changed files with 129 additions and 129 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg
static int acard_ahci_pci_device_resume(struct pci_dev *pdev);
#endif
static struct scsi_host_template acard_ahci_sht = {
static const struct scsi_host_template acard_ahci_sht = {
AHCI_SHT("acard-ahci"),
};
+1 -1
View File
@@ -101,7 +101,7 @@ static int ahci_pci_device_resume(struct device *dev);
#endif
#endif /* CONFIG_PM */
static struct scsi_host_template ahci_sht = {
static const struct scsi_host_template ahci_sht = {
AHCI_SHT("ahci"),
};
+1 -1
View File
@@ -430,7 +430,7 @@ void ahci_set_em_messages(struct ahci_host_priv *hpriv,
struct ata_port_info *pi);
int ahci_reset_em(struct ata_host *host);
void ahci_print_info(struct ata_host *host, const char *scc_s);
int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht);
int ahci_host_activate(struct ata_host *host, const struct scsi_host_template *sht);
void ahci_error_handler(struct ata_port *ap);
u32 ahci_handle_port_intr(struct ata_host *host, u32 irq_masked);
+1 -1
View File
@@ -417,7 +417,7 @@ out_disable_clks:
return ret;
}
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -185,7 +185,7 @@ static void ahci_ceva_setup(struct ahci_host_priv *hpriv)
}
}
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -153,7 +153,7 @@ static const struct ata_port_info ahci_da850_port_info = {
.port_ops = &ahci_da850_port_ops,
};
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -134,7 +134,7 @@ static const struct ata_port_info ahci_dm816_port_info = {
.port_ops = &ahci_dm816_port_ops,
};
static struct scsi_host_template ahci_dm816_platform_sht = {
static const struct scsi_host_template ahci_dm816_platform_sht = {
AHCI_SHT(AHCI_DM816_DRV_NAME),
};
+1 -1
View File
@@ -398,7 +398,7 @@ static const struct ata_port_info ahci_dwc_port_info = {
.port_ops = &ahci_dwc_port_ops,
};
static struct scsi_host_template ahci_dwc_scsi_info = {
static const struct scsi_host_template ahci_dwc_scsi_info = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -979,7 +979,7 @@ static u32 imx_ahci_parse_props(struct device *dev,
return reg_value;
}
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -37,7 +37,7 @@ static const struct ata_port_info ahci_port_info = {
.port_ops = &ahci_platform_ops,
};
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -178,7 +178,7 @@ static const struct ata_port_info ahci_mvebu_port_info = {
.port_ops = &ahci_platform_ops,
};
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -36,7 +36,7 @@ static const struct ata_port_info ahci_port_info_nolpm = {
.port_ops = &ahci_platform_ops,
};
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -159,7 +159,7 @@ static const struct ata_port_info ahci_qoriq_port_info = {
.port_ops = &ahci_qoriq_ops,
};
static struct scsi_host_template ahci_qoriq_sht = {
static const struct scsi_host_template ahci_qoriq_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -72,7 +72,7 @@ static const struct ata_port_info ahci_port_seattle_info = {
.port_ops = &ahci_seattle_ops,
};
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -138,7 +138,7 @@ static const struct ata_port_info st_ahci_port_info = {
.port_ops = &st_ahci_port_ops,
};
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -206,7 +206,7 @@ static const struct ata_port_info ahci_sunxi_port_info = {
.port_ops = &ahci_platform_ops,
};
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -506,7 +506,7 @@ static const struct of_device_id tegra_ahci_of_match[] = {
};
MODULE_DEVICE_TABLE(of, tegra_ahci_of_match);
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -710,7 +710,7 @@ static int xgene_ahci_mux_select(struct xgene_ahci_context *ctx)
return val & CFG_SATA_ENET_SELECT_MASK ? -1 : 0;
}
static struct scsi_host_template ahci_platform_sht = {
static const struct scsi_host_template ahci_platform_sht = {
AHCI_SHT(DRV_NAME),
};
+1 -1
View File
@@ -95,7 +95,7 @@ static int generic_set_mode(struct ata_link *link, struct ata_device **unused)
return 0;
}
static struct scsi_host_template generic_sht = {
static const struct scsi_host_template generic_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
+3 -3
View File
@@ -1059,7 +1059,7 @@ static u8 piix_vmw_bmdma_status(struct ata_port *ap)
return ata_bmdma_status(ap) & ~ATA_DMA_ERR;
}
static struct scsi_host_template piix_sht = {
static const struct scsi_host_template piix_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -1095,7 +1095,7 @@ static struct attribute *piix_sidpr_shost_attrs[] = {
ATTRIBUTE_GROUPS(piix_sidpr_shost);
static struct scsi_host_template piix_sidpr_sht = {
static const struct scsi_host_template piix_sidpr_sht = {
ATA_BMDMA_SHT(DRV_NAME),
.shost_groups = piix_sidpr_shost_groups,
};
@@ -1645,7 +1645,7 @@ static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
struct device *dev = &pdev->dev;
struct ata_port_info port_info[2];
const struct ata_port_info *ppi[] = { &port_info[0], &port_info[1] };
struct scsi_host_template *sht = &piix_sht;
const struct scsi_host_template *sht = &piix_sht;
unsigned long port_flags;
struct ata_host *host;
struct piix_host_priv *hpriv;

Some files were not shown because too many files have changed in this diff Show More