Constify most SCSI host templates
Subsystems (70)
Bart Van Assche
maintainerv3 cover Constify most SCSI host templates
Hi Martin,
It helps humans and the compiler if it is made explicit that SCSI host templates are not modified. Hence this patch series that constifies most SCSI host templates. Please consider this patch series for the next merge window.
Thanks,
Bart.
Changes compared to v2:
- Dropped the mac_scsi patch.
- Dropped patch "scsi: core: Update a source code comment"
Changes compared to v1:
- Simplified the qla2xxx patch as requested by John Garry.
- Removed a file from the ata patch that was added accidentally.
- Extracted the isci changes from the iscsi patch and moved these into a separate patch.
- Added Reviewed-by / Acked-by tags.
Bart Van Assche (80):
scsi: qla2xxx: Refer directly to the qla2xxx_driver_template
scsi: core: Declare most SCSI host template pointers const
scsi: core: Declare SCSI host template pointer members const
ata: Declare SCSI host templates const
firewire: sbp2: Declare the SCSI host template const RDMA/srp: Declare the SCSI host template const
scsi: message: fusion: Declare SCSI host template members const
scsi: zfcp: Declare SCSI host template const
scsi: 3w-9xxx: Declare SCSI host template const
scsi: 3w-sas: Declare SCSI host template const
scsi: 3w-xxxx: Declare SCSI host template const
scsi: BusLogic: Declare SCSI host template const
scsi: a100u2w: Declare SCSI host template const
scsi: a2091: Declare SCSI host template const
scsi: a3000: Declare SCSI host template const
scsi: aacraid: Declare SCSI host template const
scsi: advansys: Declare SCSI host template const
scsi: aha152x: Declare SCSI host template const
scsi: aha1542: Declare SCSI host template const
scsi: aic94xx: Declare SCSI host template const
scsi: arcmsr: Declare SCSI host template const
scsi: acornscsi: Declare SCSI host template const
scsi: arxescsi: Declare SCSI host template const
scsi: aha1740: Declare SCSI host template const
scsi: cumana: Declare SCSI host template const
scsi: eesox: Declare SCSI host template const
scsi: oak: Declare SCSI host template const
scsi: powertec: Declare SCSI host template const
scsi: atp870u: Declare SCSI host template const
scsi: dc395x: Declare SCSI host template const
scsi: dmx3191d: Declare SCSI host template const
scsi: elx: efct: Declare SCSI host template const
scsi: esas2r: Declare SCSI host template const
scsi: esp_scsi: Declare SCSI host template const
scsi: fcoe: Declare SCSI host template const
scsi: fnic: Declare host template const
scsi: qedf: Declare host template const
scsi: fdomain: Declare SCSI host template const
scsi: NCR5380: Declare SCSI host template const
scsi: gvp11: Declare SCSI host template const
scsi: hisi_sas: Declare SCSI host template const
scsi: hpsa: Declare SCSI host template const
scsi: hptiop: Declare SCSI host template const
scsi: ibmvfc: Declare SCSI host template const
scsi: imm: Declare SCSI host template const
scsi: initio: Declare SCSI host template const
scsi: ipr: Declare SCSI host template const
scsi: isci: Declare SCSI host template const
scsi: iscsi: Declare SCSI host template const
scsi: mac53c94: Declare SCSI host template const
scsi: megaraid: Declare SCSI host template const
scsi: mesh: Declare SCSI host template const
scsi: mpi3mr: Declare SCSI host template const
scsi: mpt3sas: Declare SCSI host template const
scsi: mvme147: Declare SCSI host template const
scsi: mvsas: Declare SCSI host template const
scsi: mvumi: Declare SCSI host template const
scsi: myrb: Declare SCSI host template const
scsi: myrs: Declare SCSI host template const
scsi: nsp32: Declare SCSI host template const
scsi: pcmcia-sym53c500: Declare SCSI host template const
scsi: pcmcia-pm8001: Declare SCSI host template const
scsi: pmcraid: Declare SCSI host template const
scsi: ppa: Declare SCSI host template const
scsi: ps3rom: Declare SCSI host template const
scsi: qla1280: Declare SCSI host template const
scsi: qla2xxx: Declare SCSI host template const
scsi: qlogicpti: Declare SCSI host template const
scsi: sgiwd93: Declare SCSI host template const
scsi: smartpqi: Declare SCSI host template const
scsi: snic: Declare SCSI host template const
scsi: stex: Declare SCSI host template const
scsi: sym53c8xx: Declare SCSI host template const
scsi: virtio-scsi: Declare SCSI host template const
scsi: wd719x: Declare SCSI host template const
scsi: xen-scsifront: Declare SCSI host template const
scsi: rts5208: Declare SCSI host template const
scsi: target: tcm-loop: Declare SCSI host template const
scsi: ufs: Declare SCSI host template const
usb: uas: Declare two host templates and host template pointers const
Documentation/scsi/scsi_mid_low_api.rst | 2 +- drivers/ata/acard-ahci.c | 2 +- drivers/ata/ahci.c | 2 +- drivers/ata/ahci.h | 2 +- drivers/ata/ahci_brcm.c | 2 +- drivers/ata/ahci_ceva.c | 2 +- drivers/ata/ahci_da850.c | 2 +- drivers/ata/ahci_dm816.c | 2 +- drivers/ata/ahci_dwc.c | 2 +- drivers/ata/ahci_imx.c | 2 +- drivers/ata/ahci_mtk.c | 2 +- drivers/ata/ahci_mvebu.c | 2 +- drivers/ata/ahci_platform.c | 2 +- drivers/ata/ahci_qoriq.c | 2 +- drivers/ata/ahci_seattle.c | 2 +- drivers/ata/ahci_st.c | 2 +- drivers/ata/ahci_sunxi.c | 2 +- drivers/ata/ahci_tegra.c | 2 +- drivers/ata/ahci_xgene.c | 2 +- drivers/ata/ata_generic.c | 2 +- drivers/ata/ata_piix.c | 6 +++--- drivers/ata/libahci.c | 4 ++-- drivers/ata/libahci_platform.c | 2 +- drivers/ata/libata-core.c | 4 ++-- drivers/ata/libata-scsi.c | 2 +- drivers/ata/libata-sff.c | 8 ++++---- drivers/ata/libata.h | 2 +- drivers/ata/pata_acpi.c | 2 +- drivers/ata/pata_ali.c | 2 +- drivers/ata/pata_amd.c | 2 +- drivers/ata/pata_arasan_cf.c | 2 +- drivers/ata/pata_artop.c | 2 +- drivers/ata/pata_atiixp.c | 2 +- drivers/ata/pata_atp867x.c | 2 +- drivers/ata/pata_buddha.c | 2 +- drivers/ata/pata_cmd640.c | 2 +- drivers/ata/pata_cmd64x.c | 2 +- drivers/ata/pata_cs5520.c | 2 +- drivers/ata/pata_cs5530.c | 2 +- drivers/ata/pata_cs5535.c | 2 +- drivers/ata/pata_cs5536.c | 2 +- drivers/ata/pata_cypress.c | 2 +- drivers/ata/pata_efar.c | 2 +- drivers/ata/pata_ep93xx.c | 2 +- drivers/ata/pata_falcon.c | 2 +- drivers/ata/pata_ftide010.c | 2 +- drivers/ata/pata_gayle.c | 2 +- drivers/ata/pata_hpt366.c | 2 +- drivers/ata/pata_hpt37x.c | 2 +- drivers/ata/pata_hpt3x2n.c | 2 +- drivers/ata/pata_hpt3x3.c | 2 +- drivers/ata/pata_icside.c | 2 +- drivers/ata/pata_imx.c | 2 +- drivers/ata/pata_isapnp.c | 2 +- drivers/ata/pata_it8213.c | 2 +- drivers/ata/pata_it821x.c | 2 +- drivers/ata/pata_ixp4xx_cf.c | 2 +- drivers/ata/pata_jmicron.c | 2 +- drivers/ata/pata_legacy.c | 2 +- drivers/ata/pata_macio.c | 2 +- drivers/ata/pata_marvell.c | 2 +- drivers/ata/pata_mpc52xx.c | 2 +- drivers/ata/pata_mpiix.c | 2 +- drivers/ata/pata_netcell.c | 2 +- drivers/ata/pata_ninja32.c | 2 +- drivers/ata/pata_ns87410.c | 2 +- drivers/ata/pata_ns87415.c | 2 +- drivers/ata/pata_octeon_cf.c | 2 +- drivers/ata/pata_of_platform.c | 2 +- drivers/ata/pata_oldpiix.c | 2 +- drivers/ata/pata_opti.c | 2 +- drivers/ata/pata_optidma.c | 2 +- drivers/ata/pata_parport/pata_parport.c | 2 +- drivers/ata/pata_pcmcia.c | 2 +- drivers/ata/pata_pdc2027x.c | 2 +- drivers/ata/pata_pdc202xx_old.c | 2 +- drivers/ata/pata_piccolo.c | 2 +- drivers/ata/pata_platform.c | 4 ++-- drivers/ata/pata_pxa.c | 2 +- drivers/ata/pata_radisys.c | 2 +- drivers/ata/pata_rb532_cf.c | 2 +- drivers/ata/pata_rdc.c | 2 +- drivers/ata/pata_rz1000.c | 2 +- drivers/ata/pata_sc1200.c | 2 +- drivers/ata/pata_sch.c | 2 +- drivers/ata/pata_serverworks.c | 6 +++--- drivers/ata/pata_sil680.c | 2 +- drivers/ata/pata_sis.c | 2 +- drivers/ata/pata_sl82c105.c | 2 +- drivers/ata/pata_triflex.c | 2 +- drivers/ata/pata_via.c | 2 +- drivers/ata/pdc_adma.c | 2 +- drivers/ata/sata_dwc_460ex.c | 2 +- drivers/ata/sata_fsl.c | 2 +- drivers/ata/sata_highbank.c | 2 +- drivers/ata/sata_inic162x.c | 2 +- drivers/ata/sata_mv.c | 4 ++-- drivers/ata/sata_nv.c | 8 ++++---- drivers/ata/sata_promise.c | 2 +- drivers/ata/sata_qstor.c | 2 +- drivers/ata/sata_rcar.c | 2 +- drivers/ata/sata_sil.c | 2 +- drivers/ata/sata_sil24.c | 2 +- drivers/ata/sata_sis.c | 2 +- drivers/ata/sata_svw.c | 2 +- drivers/ata/sata_sx4.c | 2 +- drivers/ata/sata_uli.c | 2 +- drivers/ata/sata_via.c | 2 +- drivers/ata/sata_vsc.c | 2 +- drivers/firewire/sbp2.c | 4 ++-- drivers/infiniband/ulp/iser/iscsi_iser.c | 4 ++-- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- drivers/message/fusion/mptfc.c | 2 +- drivers/message/fusion/mptsas.c | 2 +- drivers/message/fusion/mptspi.c | 2 +- drivers/s390/scsi/zfcp_scsi.c | 2 +- drivers/scsi/3w-9xxx.c | 3 +-- drivers/scsi/3w-sas.c | 3 +-- drivers/scsi/3w-xxxx.c | 2 +- drivers/scsi/BusLogic.c | 4 ++-- drivers/scsi/a100u2w.c | 2 +- drivers/scsi/a2091.c | 2 +- drivers/scsi/a3000.c | 2 +- drivers/scsi/aacraid/linit.c | 2 +- drivers/scsi/advansys.c | 2 +- drivers/scsi/aha152x.c | 4 ++-- drivers/scsi/aha1542.c | 5 +++-- drivers/scsi/aha1740.c | 2 +- drivers/scsi/aic94xx/aic94xx_init.c | 2 +- drivers/scsi/am53c974.c | 2 +- drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- drivers/scsi/arm/acornscsi.c | 2 +- drivers/scsi/arm/arxescsi.c | 2 +- drivers/scsi/arm/cumana_1.c | 2 +- drivers/scsi/arm/cumana_2.c | 2 +- drivers/scsi/arm/eesox.c | 2 +- drivers/scsi/arm/oak.c | 2 +- drivers/scsi/arm/powertec.c | 2 +- drivers/scsi/atp870u.c | 4 ++-- drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/scsi/bnx2i/bnx2i_iscsi.c | 4 ++-- drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 2 +- drivers/scsi/cxgbi/libcxgbi.c | 2 +- drivers/scsi/cxgbi/libcxgbi.h | 2 +- drivers/scsi/dc395x.c | 2 +- drivers/scsi/dmx3191d.c | 2 +- drivers/scsi/elx/efct/efct_xport.c | 2 +- drivers/scsi/esas2r/esas2r_main.c | 2 +- drivers/scsi/esp_scsi.c | 2 +- drivers/scsi/esp_scsi.h | 2 +- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/fdomain.c | 2 +- drivers/scsi/fnic/fnic_main.c | 2 +- drivers/scsi/g_NCR5380.c | 4 ++-- drivers/scsi/gvp11.c | 2 +- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- drivers/scsi/hosts.c | 4 ++-- drivers/scsi/hpsa.c | 2 +- drivers/scsi/hptiop.c | 2 +- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/imm.c | 2 +- drivers/scsi/initio.c | 2 +- drivers/scsi/ipr.c | 2 +- drivers/scsi/isci/init.c | 2 +- drivers/scsi/iscsi_tcp.c | 4 ++-- drivers/scsi/jazz_esp.c | 2 +- drivers/scsi/libiscsi.c | 2 +- drivers/scsi/mac53c94.c | 2 +- drivers/scsi/mac_esp.c | 2 +- drivers/scsi/megaraid.c | 2 +- drivers/scsi/megaraid/megaraid_mbox.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- drivers/scsi/mesh.c | 2 +- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- drivers/scsi/mvme147.c | 2 +- drivers/scsi/mvsas/mv_init.c | 2 +- drivers/scsi/mvumi.c | 2 +- drivers/scsi/myrb.c | 2 +- drivers/scsi/myrs.c | 2 +- drivers/scsi/nsp32.c | 2 +- drivers/scsi/pcmcia/sym53c500_cs.c | 4 ++-- drivers/scsi/pm8001/pm8001_init.c | 2 +- drivers/scsi/pmcraid.c | 2 +- drivers/scsi/ppa.c | 2 +- drivers/scsi/ps3rom.c | 2 +- drivers/scsi/qedf/qedf_main.c | 2 +- drivers/scsi/qedi/qedi_gbl.h | 2 +- drivers/scsi/qedi/qedi_iscsi.c | 2 +- drivers/scsi/qla1280.c | 2 +- drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_mid.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- drivers/scsi/qla2xxx/qla_target.c | 3 +-- drivers/scsi/qlogicpti.c | 2 +- drivers/scsi/scsi_error.c | 16 ++++++++-------- drivers/scsi/scsi_sysfs.c | 6 +++--- drivers/scsi/sgiwd93.c | 2 +- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- drivers/scsi/snic/snic_main.c | 2 +- drivers/scsi/stex.c | 2 +- drivers/scsi/sun3x_esp.c | 2 +- drivers/scsi/sun_esp.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 4 ++-- drivers/scsi/virtio_scsi.c | 2 +- drivers/scsi/wd719x.c | 2 +- drivers/scsi/xen-scsifront.c | 2 +- drivers/scsi/zorro_esp.c | 2 +- drivers/staging/rts5208/rtsx.c | 2 +- drivers/target/loopback/tcm_loop.c | 2 +- drivers/ufs/core/ufshcd.c | 2 +- drivers/usb/image/microtek.c | 2 +- drivers/usb/storage/uas.c | 2 +- drivers/usb/storage/usb.c | 2 +- drivers/usb/storage/usb.h | 2 +- include/linux/ahci_platform.h | 2 +- include/linux/ata_platform.h | 2 +- include/linux/libata.h | 10 +++++----- include/linux/raid_class.h | 2 +- include/scsi/libfc.h | 2 +- include/scsi/libiscsi.h | 2 +- include/scsi/scsi_host.h | 4 ++-- 225 files changed, 268 insertions(+), 270 deletions(-)
Bart Van Assche
maintainerPATCH v3 1/80 scsi: qla2xxx: Refer directly to the qla2xxx_driver_template
Access the qla2xxx_driver_template data structure directly instead of via the host pointer. This patch prepares for declaring the 'hostt' pointer const.
--- drivers/scsi/qla2xxx/qla_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_target.c +1 -2
@@ -6395,8 +6395,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha)return -ENOMEM ; } -if (!(base_vha->host->hostt->supported_mode &MODE_TARGET )) - base_vha->host->hostt->supported_mode |=MODE_TARGET ; + qla2xxx_driver_template.supported_mode |=MODE_TARGET ; rc =btree_init64 (&tgt->lun_qpair_map);if (rc) {
Bart Van Assche
maintainerPATCH v3 2/80 scsi: core: Declare most SCSI host template pointers const
In reply to Bart Van AsschePrepare for constifying most SCSI host template pointers by constifying the SCSI host template pointer arguments and variables in the SCSI core.
--- drivers/scsi/scsi_error.c | 16 ++++++++-------- drivers/scsi/scsi_sysfs.c | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-)
drivers/scsi/scsi_error.c +8 -8
@@ -58,7 +58,7 @@#define HOST_RESET_SETTLE_TIME (10)static int scsi_eh_try_stu (struct scsi_cmnd *scmd); -static enum scsi_disposition scsi_try_to_abort_cmd (struct scsi_host_template *, +static enum scsi_disposition scsi_try_to_abort_cmd (const struct scsi_host_template *,struct scsi_cmnd *);void scsi_eh_wakeup (struct Scsi_Host *shost)
@@ -699,7 +699,7 @@ EXPORT_SYMBOL_GPL(scsi_check_sense);static void scsi_handle_queue_ramp_up (struct scsi_device *sdev) { -struct scsi_host_template *sht = sdev->host->hostt; +const struct scsi_host_template *sht = sdev->host->hostt;struct scsi_device *tmp_sdev; if (!sht->track_queue_depth ||
@@ -731,7 +731,7 @@ static void scsi_handle_queue_ramp_up(struct scsi_device *sdev)static void scsi_handle_queue_full (struct scsi_device *sdev) { -struct scsi_host_template *sht = sdev->host->hostt; +const struct scsi_host_template *sht = sdev->host->hostt;struct scsi_device *tmp_sdev;if (!sht->track_queue_depth)
@@ -840,7 +840,7 @@ static enum scsi_disposition scsi_try_host_reset(struct scsi_cmnd *scmd)unsigned long flags;enum scsi_disposition rtn;struct Scsi_Host *host = scmd->device->host; -struct scsi_host_template *hostt = host->hostt; +const struct scsi_host_template *hostt = host->hostt;SCSI_LOG_ERROR_RECOVERY (3 ,shost_printk (KERN_INFO , host,"Snd Host RST\n" ));
@@ -870,7 +870,7 @@ static enum scsi_disposition scsi_try_bus_reset(struct scsi_cmnd *scmd)unsigned long flags;enum scsi_disposition rtn;struct Scsi_Host *host = scmd->device->host; -struct scsi_host_template *hostt = host->hostt; +const struct scsi_host_template *hostt = host->hostt;SCSI_LOG_ERROR_RECOVERY (3 ,scmd_printk (KERN_INFO , scmd,"%s: Snd Bus RST\n" , __func__));
@@ -912,7 +912,7 @@ static enum scsi_disposition scsi_try_target_reset(struct scsi_cmnd *scmd)unsigned long flags;enum scsi_disposition rtn;struct Scsi_Host *host = scmd->device->host; -struct scsi_host_template *hostt = host->hostt; +const struct scsi_host_template *hostt = host->hostt;if (!hostt->eh_target_reset_handler)return FAILED ;
@@ -941,7 +941,7 @@ static enum scsi_disposition scsi_try_target_reset(struct scsi_cmnd *scmd)static enum scsi_disposition scsi_try_bus_device_reset (struct scsi_cmnd *scmd) {enum scsi_disposition rtn; -struct scsi_host_template *hostt = scmd->device->host->hostt; +const struct scsi_host_template *hostt = scmd->device->host->hostt;if (!hostt->eh_device_reset_handler)return FAILED ;
@@ -970,7 +970,7 @@ static enum scsi_disposition scsi_try_bus_device_reset(struct scsi_cmnd *scmd)* link down on FibreChannel) */ static enum scsi_disposition -scsi_try_to_abort_cmd (struct scsi_host_template *hostt,struct scsi_cmnd *scmd) +scsi_try_to_abort_cmd (const struct scsi_host_template *hostt,struct scsi_cmnd *scmd) {if (!hostt->eh_abort_handler)return FAILED ;
drivers/scsi/scsi_sysfs.c +3 -3
@@ -296,7 +296,7 @@ store_host_reset(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {struct Scsi_Host *shost =class_to_shost (dev); -struct scsi_host_template *sht = shost->hostt; +const struct scsi_host_template *sht = shost->hostt;int ret = -EINVAL ;int type;
@@ -1025,7 +1025,7 @@ sdev_store_queue_depth(struct device *dev, struct device_attribute *attr, {int depth, retval;struct scsi_device *sdev =to_scsi_device (dev); -struct scsi_host_template *sht = sdev->host->hostt; +const struct scsi_host_template *sht = sdev->host->hostt;if (!sht->change_queue_depth)return -EINVAL ;
@@ -1606,7 +1606,7 @@ void scsi_sysfs_device_initialize(struct scsi_device *sdev) {unsigned long flags;struct Scsi_Host *shost = sdev->host; -struct scsi_host_template *hostt = shost->hostt; +const struct scsi_host_template *hostt = shost->hostt;struct scsi_target *starget = sdev->sdev_target;device_initialize (&sdev->sdev_gendev);
Bart Van Assche
maintainerPATCH v3 3/80 scsi: core: Declare SCSI host template pointer members const
In reply to Bart Van AsscheDeclare the SCSI host template pointer members const and also the remaining SCSI host template pointers in the SCSI core.
--- Documentation/scsi/scsi_mid_low_api.rst | 2 +- drivers/scsi/hosts.c | 4 ++-- include/linux/raid_class.h | 2 +- include/scsi/libfc.h | 2 +- include/scsi/scsi_host.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-)
Documentation/scsi/scsi_mid_low_api.rst +1 -1
@@ -436,7 +436,7 @@ Details:: * * Defined in: drivers/scsi/hosts.c . **/ - struct Scsi_Host * scsi_host_alloc(struct scsi_host_template * sht, + struct Scsi_Host * scsi_host_alloc(const struct scsi_host_template * sht, int privsize)
drivers/scsi/hosts.c +2 -2
@@ -219,7 +219,7 @@ EXPORT_SYMBOL(scsi_remove_host);int scsi_add_host_with_dma (struct Scsi_Host *shost,struct device *dev,struct device *dma_dev) { -struct scsi_host_template *sht = shost->hostt; +const struct scsi_host_template *sht = shost->hostt;int error = -EINVAL ; shost_printk(KERN_INFO, shost, "%s\n",
@@ -392,7 +392,7 @@ static struct device_type scsi_host_type = {* Return value: * Pointer to a new Scsi_Host **/ -struct Scsi_Host *scsi_host_alloc (struct scsi_host_template *sht,int privsize) +struct Scsi_Host *scsi_host_alloc (const struct scsi_host_template *sht,int privsize) {struct Scsi_Host *shost;int index;
include/linux/raid_class.h +1 -1
@@ -11,7 +11,7 @@ struct raid_template { };struct raid_function_template { -void *cookie; +const void *cookie;int (*is_raid)(struct device *);void (*get_resync)(struct device *);void (*get_state)(struct device *);
include/scsi/libfc.h +1 -1
@@ -866,7 +866,7 @@ static inline void *lport_priv(const struct fc_lport *lport)* Returns: libfc lport */ static inline struct fc_lport * -libfc_host_alloc (struct scsi_host_template *sht,int priv_size) +libfc_host_alloc (const struct scsi_host_template *sht,int priv_size) {struct fc_lport *lport;struct Scsi_Host *shost;
include/scsi/scsi_host.h +2 -2
@@ -554,7 +554,7 @@ struct Scsi_Host {struct completion * eh_action;/* Wait for specific actions on the host. */ wait_queue_head_t host_wait; -struct scsi_host_template *hostt; +const struct scsi_host_template *hostt;struct scsi_transport_template *transportt;struct kref tagset_refcnt;
@@ -747,7 +747,7 @@ static inline int scsi_host_in_recovery(struct Scsi_Host *shost)extern int scsi_queue_work (struct Scsi_Host *,struct work_struct *);extern void scsi_flush_work (struct Scsi_Host *); -extern struct Scsi_Host *scsi_host_alloc (struct scsi_host_template *,int ); +extern struct Scsi_Host *scsi_host_alloc (const struct scsi_host_template *,int );extern int __must_check scsi_add_host_with_dma (struct Scsi_Host *,struct device *,struct device *);
Bart Van Assche
maintainerPATCH v3 4/80 ata: Declare SCSI host templates const
In reply to Bart Van AsscheMake it explicit that ATA host templates are not modified.
--- drivers/ata/acard-ahci.c | 2 +- drivers/ata/ahci.c | 2 +- drivers/ata/ahci.h | 2 +- drivers/ata/ahci_brcm.c | 2 +- drivers/ata/ahci_ceva.c | 2 +- drivers/ata/ahci_da850.c | 2 +- drivers/ata/ahci_dm816.c | 2 +- drivers/ata/ahci_dwc.c | 2 +- drivers/ata/ahci_imx.c | 2 +- drivers/ata/ahci_mtk.c | 2 +- drivers/ata/ahci_mvebu.c | 2 +- drivers/ata/ahci_platform.c | 2 +- drivers/ata/ahci_qoriq.c | 2 +- drivers/ata/ahci_seattle.c | 2 +- drivers/ata/ahci_st.c | 2 +- drivers/ata/ahci_sunxi.c | 2 +- drivers/ata/ahci_tegra.c | 2 +- drivers/ata/ahci_xgene.c | 2 +- drivers/ata/ata_generic.c | 2 +- drivers/ata/ata_piix.c | 6 +++--- drivers/ata/libahci.c | 4 ++-- drivers/ata/libahci_platform.c | 2 +- drivers/ata/libata-core.c | 4 ++-- drivers/ata/libata-scsi.c | 2 +- drivers/ata/libata-sff.c | 8 ++++---- drivers/ata/libata.h | 2 +- drivers/ata/pata_acpi.c | 2 +- drivers/ata/pata_ali.c | 2 +- drivers/ata/pata_amd.c | 2 +- drivers/ata/pata_arasan_cf.c | 2 +- drivers/ata/pata_artop.c | 2 +- drivers/ata/pata_atiixp.c | 2 +- drivers/ata/pata_atp867x.c | 2 +- drivers/ata/pata_buddha.c | 2 +- drivers/ata/pata_cmd640.c | 2 +- drivers/ata/pata_cmd64x.c | 2 +- drivers/ata/pata_cs5520.c | 2 +- drivers/ata/pata_cs5530.c | 2 +- drivers/ata/pata_cs5535.c | 2 +- drivers/ata/pata_cs5536.c | 2 +- drivers/ata/pata_cypress.c | 2 +- drivers/ata/pata_efar.c | 2 +- drivers/ata/pata_ep93xx.c | 2 +- drivers/ata/pata_falcon.c | 2 +- drivers/ata/pata_ftide010.c | 2 +- drivers/ata/pata_gayle.c | 2 +- drivers/ata/pata_hpt366.c | 2 +- drivers/ata/pata_hpt37x.c | 2 +- drivers/ata/pata_hpt3x2n.c | 2 +- drivers/ata/pata_hpt3x3.c | 2 +- drivers/ata/pata_icside.c | 2 +- drivers/ata/pata_imx.c | 2 +- drivers/ata/pata_isapnp.c | 2 +- drivers/ata/pata_it8213.c | 2 +- drivers/ata/pata_it821x.c | 2 +- drivers/ata/pata_ixp4xx_cf.c | 2 +- drivers/ata/pata_jmicron.c | 2 +- drivers/ata/pata_legacy.c | 2 +- drivers/ata/pata_macio.c | 2 +- drivers/ata/pata_marvell.c | 2 +- drivers/ata/pata_mpc52xx.c | 2 +- drivers/ata/pata_mpiix.c | 2 +- drivers/ata/pata_netcell.c | 2 +- drivers/ata/pata_ninja32.c | 2 +- drivers/ata/pata_ns87410.c | 2 +- drivers/ata/pata_ns87415.c | 2 +- drivers/ata/pata_octeon_cf.c | 2 +- drivers/ata/pata_of_platform.c | 2 +- drivers/ata/pata_oldpiix.c | 2 +- drivers/ata/pata_opti.c | 2 +- drivers/ata/pata_optidma.c | 2 +- drivers/ata/pata_parport/pata_parport.c | 2 +- drivers/ata/pata_pcmcia.c | 2 +- drivers/ata/pata_pdc2027x.c | 2 +- drivers/ata/pata_pdc202xx_old.c | 2 +- drivers/ata/pata_piccolo.c | 2 +- drivers/ata/pata_platform.c | 4 ++-- drivers/ata/pata_pxa.c | 2 +- drivers/ata/pata_radisys.c | 2 +- drivers/ata/pata_rb532_cf.c | 2 +- drivers/ata/pata_rdc.c | 2 +- drivers/ata/pata_rz1000.c | 2 +- drivers/ata/pata_sc1200.c | 2 +- drivers/ata/pata_sch.c | 2 +- drivers/ata/pata_serverworks.c | 6 +++--- drivers/ata/pata_sil680.c | 2 +- drivers/ata/pata_sis.c | 2 +- drivers/ata/pata_sl82c105.c | 2 +- drivers/ata/pata_triflex.c | 2 +- drivers/ata/pata_via.c | 2 +- drivers/ata/pdc_adma.c | 2 +- drivers/ata/sata_dwc_460ex.c | 2 +- drivers/ata/sata_fsl.c | 2 +- drivers/ata/sata_highbank.c | 2 +- drivers/ata/sata_inic162x.c | 2 +- drivers/ata/sata_mv.c | 4 ++-- drivers/ata/sata_nv.c | 8 ++++---- drivers/ata/sata_promise.c | 2 +- drivers/ata/sata_qstor.c | 2 +- drivers/ata/sata_rcar.c | 2 +- drivers/ata/sata_sil.c | 2 +- drivers/ata/sata_sil24.c | 2 +- drivers/ata/sata_sis.c | 2 +- drivers/ata/sata_svw.c | 2 +- drivers/ata/sata_sx4.c | 2 +- drivers/ata/sata_uli.c | 2 +- drivers/ata/sata_via.c | 2 +- drivers/ata/sata_vsc.c | 2 +- include/linux/ahci_platform.h | 2 +- include/linux/ata_platform.h | 2 +- include/linux/libata.h | 10 +++++----- 111 files changed, 129 insertions(+), 129 deletions(-)
drivers/ata/acard-ahci.c +1 -1
@@ -66,7 +66,7 @@ static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesgstatic 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" ), };
drivers/ata/ahci.c +1 -1
@@ -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" ), };
drivers/ata/ahci.h +1 -1
@@ -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);
drivers/ata/ahci_brcm.c +1 -1
@@ -417,7 +417,7 @@ static int __maybe_unused brcm_ahci_resume(struct device *dev)return ret; } -static struct scsi_host_template ahci_platform_sht = { +static const struct scsi_host_template ahci_platform_sht = {AHCI_SHT (DRV_NAME ), };
drivers/ata/ahci_ceva.c +1 -1
@@ -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 ), };
drivers/ata/ahci_da850.c +1 -1
@@ -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 ), };
drivers/ata/ahci_dm816.c +1 -1
@@ -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 ), };
drivers/ata/ahci_dwc.c +1 -1
@@ -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 ), };
drivers/ata/ahci_imx.c +1 -1
@@ -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 ), };
drivers/ata/ahci_mtk.c +1 -1
@@ -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 ), };
drivers/ata/ahci_mvebu.c +1 -1
@@ -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 ), };
drivers/ata/ahci_platform.c +1 -1
@@ -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 ), };
drivers/ata/ahci_qoriq.c +1 -1
@@ -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 ), };
drivers/ata/ahci_seattle.c +1 -1
@@ -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 ), };
drivers/ata/ahci_st.c +1 -1
@@ -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 ), };
drivers/ata/ahci_sunxi.c +1 -1
@@ -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 ), };
drivers/ata/ahci_tegra.c +1 -1
@@ -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 ), };
drivers/ata/ahci_xgene.c +1 -1
@@ -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 ), };
drivers/ata/ata_generic.c +1 -1
@@ -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 ), };
drivers/ata/ata_piix.c +3 -3
@@ -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;
drivers/ata/libahci.c +2 -2
@@ -2692,7 +2692,7 @@ void ahci_set_em_messages(struct ahci_host_priv *hpriv,EXPORT_SYMBOL_GPL (ahci_set_em_messages);static int ahci_host_activate_multi_irqs (struct ata_host *host, -struct scsi_host_template *sht) +const struct scsi_host_template *sht) {struct ahci_host_priv *hpriv = host->private_data;int i, rc;
@@ -2736,7 +2736,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host,* RETURNS: * 0 on success, -errno otherwise. */ -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) {struct ahci_host_priv *hpriv = host->private_data;int irq = hpriv->irq;
drivers/ata/libahci_platform.c +1 -1
@@ -680,7 +680,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_get_resources);int ahci_platform_init_host (struct platform_device *pdev,struct ahci_host_priv *hpriv,const struct ata_port_info *pi_template, -struct scsi_host_template *sht) +const struct scsi_host_template *sht) {struct device *dev = &pdev->dev;struct ata_port_info pi = *pi_template;
drivers/ata/libata-core.c +2 -2
@@ -5775,7 +5775,7 @@ static void async_port_probe(void *data, async_cookie_t cookie)* RETURNS: * 0 on success, -errno otherwise. */ -int ata_host_register (struct ata_host *host,struct scsi_host_template *sht) +int ata_host_register (struct ata_host *host,const struct scsi_host_template *sht) {int i, rc;
@@ -5883,7 +5883,7 @@ EXPORT_SYMBOL_GPL(ata_host_register);*/ int ata_host_activate (struct ata_host *host,int irq,irq_handler_t irq_handler,unsigned long irq_flags, -struct scsi_host_template *sht) +const struct scsi_host_template *sht) {int i, rc;char *irq_desc;
drivers/ata/libata-scsi.c +1 -1
@@ -4186,7 +4186,7 @@ void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)scsi_done (cmd); } -int ata_scsi_add_hosts (struct ata_host *host,struct scsi_host_template *sht) +int ata_scsi_add_hosts (struct ata_host *host,const struct scsi_host_template *sht) {int i, rc;
drivers/ata/libata-sff.c +4 -4
@@ -2281,7 +2281,7 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_prepare_host);*/ int ata_pci_sff_activate_host (struct ata_host *host,irq_handler_t irq_handler, -struct scsi_host_template *sht) +const struct scsi_host_template *sht) {struct device *dev = host->dev;struct pci_dev *pdev =to_pci_dev (dev);
@@ -2378,7 +2378,7 @@ static const struct ata_port_info *ata_sff_find_valid_pi(static int ata_pci_init_one (struct pci_dev *pdev,const struct ata_port_info *const *ppi, -struct scsi_host_template *sht,void *host_priv, +const struct scsi_host_template *sht,void *host_priv,int hflags,bool bmdma) {struct device *dev = &pdev->dev;
@@ -2452,7 +2452,7 @@ static int ata_pci_init_one(struct pci_dev *pdev,*/ int ata_pci_sff_init_one (struct pci_dev *pdev,const struct ata_port_info *const *ppi, -struct scsi_host_template *sht,void *host_priv,int hflag) +const struct scsi_host_template *sht,void *host_priv,int hflag) {return ata_pci_init_one (pdev, ppi, sht, host_priv, hflag,0 ); }
@@ -3175,7 +3175,7 @@ EXPORT_SYMBOL_GPL(ata_pci_bmdma_prepare_host);*/ int ata_pci_bmdma_init_one (struct pci_dev *pdev,const struct ata_port_info *const * ppi, -struct scsi_host_template *sht,void *host_priv, +const struct scsi_host_template *sht,void *host_priv,int hflags) {return ata_pci_init_one (pdev, ppi, sht, host_priv, hflags,1 );
drivers/ata/libata.h +1 -1
@@ -111,7 +111,7 @@ static inline void ata_acpi_bind_dev(struct ata_device *dev) {}extern struct ata_device *ata_scsi_find_dev (struct ata_port *ap,const struct scsi_device *scsidev);extern int ata_scsi_add_hosts (struct ata_host *host, -struct scsi_host_template *sht); +const struct scsi_host_template *sht);extern void ata_scsi_scan_host (struct ata_port *ap,int sync);extern int ata_scsi_offline_dev (struct ata_device *dev);extern bool ata_scsi_sense_is_valid (u8 sk,u8 asc,u8 ascq);
drivers/ata/pata_acpi.c +1 -1
@@ -205,7 +205,7 @@ static int pacpi_port_start(struct ata_port *ap)return ata_bmdma_port_start (ap); } -static struct scsi_host_template pacpi_sht = { +static const struct scsi_host_template pacpi_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_ali.c +1 -1
@@ -355,7 +355,7 @@ static void ali_c2_c3_postreset(struct ata_link *link, unsigned int *classes)ata_sff_postreset (link, classes); } -static struct scsi_host_template ali_sht = { +static const struct scsi_host_template ali_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_amd.c +1 -1
@@ -388,7 +388,7 @@ static void nv_host_stop(struct ata_host *host)pci_write_config_dword (to_pci_dev (host->dev),0x60 , udma); } -static struct scsi_host_template amd_sht = { +static const struct scsi_host_template amd_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_arasan_cf.c +1 -1
@@ -218,7 +218,7 @@ struct arasan_cf_dev {struct ata_queued_cmd *qc; }; -static struct scsi_host_template arasan_cf_sht = { +static const struct scsi_host_template arasan_cf_sht = {ATA_BASE_SHT (DRIVER_NAME ), .dma_boundary =0xFFFFFFFFUL , };
drivers/ata/pata_artop.c +1 -1
@@ -292,7 +292,7 @@ static int artop6210_qc_defer(struct ata_queued_cmd *qc)return 0 ; } -static struct scsi_host_template artop_sht = { +static const struct scsi_host_template artop_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_atiixp.c +1 -1
@@ -251,7 +251,7 @@ static void atiixp_bmdma_stop(struct ata_queued_cmd *qc)ata_bmdma_stop (qc); } -static struct scsi_host_template atiixp_sht = { +static const struct scsi_host_template atiixp_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_DUMB_MAX_PRD , .dma_boundary =ATA_DMA_BOUNDARY ,
drivers/ata/pata_atp867x.c +1 -1
@@ -259,7 +259,7 @@ static int atp867x_cable_detect(struct ata_port *ap)return ATA_CBL_PATA_UNK ; } -static struct scsi_host_template atp867x_sht = { +static const struct scsi_host_template atp867x_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_buddha.c +1 -1
@@ -57,7 +57,7 @@ static unsigned int xsurf_bases[2] = { XSURF_BASE1, XSURF_BASE2 }; -static struct scsi_host_template pata_buddha_sht = { +static const struct scsi_host_template pata_buddha_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_cmd640.c +1 -1
@@ -172,7 +172,7 @@ static bool cmd640_sff_irq_check(struct ata_port *ap)return irq_stat & irq_mask; } -static struct scsi_host_template cmd640_sht = { +static const struct scsi_host_template cmd640_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_cmd64x.c +1 -1
@@ -319,7 +319,7 @@ static void cmd646r1_bmdma_stop(struct ata_queued_cmd *qc)ata_bmdma_stop (qc); } -static struct scsi_host_template cmd64x_sht = { +static const struct scsi_host_template cmd64x_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_cs5520.c +1 -1
@@ -94,7 +94,7 @@ static void cs5520_set_piomode(struct ata_port *ap, struct ata_device *adev)cs5520_set_timings (ap, adev, adev->pio_mode); } -static struct scsi_host_template cs5520_sht = { +static const struct scsi_host_template cs5520_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_DUMB_MAX_PRD , .dma_boundary =ATA_DMA_BOUNDARY ,
drivers/ata/pata_cs5530.c +1 -1
@@ -146,7 +146,7 @@ static unsigned int cs5530_qc_issue(struct ata_queued_cmd *qc)return ata_bmdma_qc_issue (qc); } -static struct scsi_host_template cs5530_sht = { +static const struct scsi_host_template cs5530_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_DUMB_MAX_PRD , .dma_boundary =ATA_DMA_BOUNDARY ,
drivers/ata/pata_cs5535.c +1 -1
@@ -141,7 +141,7 @@ static void cs5535_set_dmamode(struct ata_port *ap, struct ata_device *adev)wrmsr (ATAC_CH0D0_DMA +2 * adev->devno, reg,0 ); } -static struct scsi_host_template cs5535_sht = { +static const struct scsi_host_template cs5535_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_cs5536.c +1 -1
@@ -217,7 +217,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)cs5536_write (pdev,ETC , etc); } -static struct scsi_host_template cs5536_sht = { +static const struct scsi_host_template cs5536_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_cypress.c +1 -1
@@ -115,7 +115,7 @@ static void cy82c693_set_dmamode(struct ata_port *ap, struct ata_device *adev)outb (0x50 ,0x23 ); } -static struct scsi_host_template cy82c693_sht = { +static const struct scsi_host_template cy82c693_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_efar.c +1 -1
@@ -234,7 +234,7 @@ static void efar_set_dmamode (struct ata_port *ap, struct ata_device *adev)spin_unlock_irqrestore (&efar_lock, flags); } -static struct scsi_host_template efar_sht = { +static const struct scsi_host_template efar_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_ep93xx.c +1 -1
@@ -872,7 +872,7 @@ static int ep93xx_pata_port_start(struct ata_port *ap)return 0 ; } -static struct scsi_host_template ep93xx_pata_sht = { +static const struct scsi_host_template ep93xx_pata_sht = {ATA_BASE_SHT (DRV_NAME ),/* ep93xx dma implementation limit */ .sg_tablesize =32 ,
drivers/ata/pata_falcon.c +1 -1
@@ -33,7 +33,7 @@#define DRV_NAME "pata_falcon"#define DRV_VERSION "0.1.0" -static struct scsi_host_template pata_falcon_sht = { +static const struct scsi_host_template pata_falcon_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_ftide010.c +1 -1
@@ -84,7 +84,7 @@ struct ftide010 {#define FTIDE010_CLK_MOD_DEV0_UDMA_EN BIT(4)#define FTIDE010_CLK_MOD_DEV1_UDMA_EN BIT(5) -static struct scsi_host_template pata_ftide010_sht = { +static const struct scsi_host_template pata_ftide010_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_gayle.c +1 -1
@@ -35,7 +35,7 @@#define GAYLE_CONTROL 0x101a -static struct scsi_host_template pata_gayle_sht = { +static const struct scsi_host_template pata_gayle_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_hpt366.c +1 -1
@@ -312,7 +312,7 @@ static int hpt366_prereset(struct ata_link *link, unsigned long deadline)return ata_sff_prereset (link, deadline); } -static struct scsi_host_template hpt36x_sht = { +static const struct scsi_host_template hpt36x_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_hpt37x.c +1 -1
@@ -526,7 +526,7 @@ static void hpt37x_bmdma_stop(struct ata_queued_cmd *qc) } -static struct scsi_host_template hpt37x_sht = { +static const struct scsi_host_template hpt37x_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_hpt3x2n.c +1 -1
@@ -337,7 +337,7 @@ static unsigned int hpt3x2n_qc_issue(struct ata_queued_cmd *qc)return ata_bmdma_qc_issue (qc); } -static struct scsi_host_template hpt3x2n_sht = { +static const struct scsi_host_template hpt3x2n_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_hpt3x3.c +1 -1
@@ -136,7 +136,7 @@ static int hpt3x3_atapi_dma(struct ata_queued_cmd *qc)#endif /* CONFIG_PATA_HPT3X3_DMA */ -static struct scsi_host_template hpt3x3_sht = { +static const struct scsi_host_template hpt3x3_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_icside.c +1 -1
@@ -298,7 +298,7 @@ static int icside_dma_init(struct pata_icside_info *info) } -static struct scsi_host_template pata_icside_sht = { +static const struct scsi_host_template pata_icside_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =SG_MAX_SEGMENTS , .dma_boundary =IOMD_DMA_BOUNDARY ,
drivers/ata/pata_imx.c +1 -1
@@ -97,7 +97,7 @@ static void pata_imx_set_piomode(struct ata_port *ap, struct ata_device *adev)__raw_writel (val, priv->host_regs +PATA_IMX_ATA_CONTROL ); } -static struct scsi_host_template pata_imx_sht = { +static const struct scsi_host_template pata_imx_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_isapnp.c +1 -1
@@ -20,7 +20,7 @@#define DRV_NAME "pata_isapnp"#define DRV_VERSION "0.2.5" -static struct scsi_host_template isapnp_sht = { +static const struct scsi_host_template isapnp_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_it8213.c +1 -1
@@ -228,7 +228,7 @@ static void it8213_set_dmamode (struct ata_port *ap, struct ata_device *adev)pci_write_config_byte (dev,0x48 , udma_enable); } -static struct scsi_host_template it8213_sht = { +static const struct scsi_host_template it8213_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_it821x.c +1 -1
@@ -800,7 +800,7 @@ static int it821x_rdc_cable(struct ata_port *ap)return ATA_CBL_PATA80 ; } -static struct scsi_host_template it821x_sht = { +static const struct scsi_host_template it821x_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_ixp4xx_cf.c +1 -1
@@ -173,7 +173,7 @@ static unsigned int ixp4xx_mmio_data_xfer(struct ata_queued_cmd *qc,return words <<1 ; } -static struct scsi_host_template ixp4xx_sht = { +static const struct scsi_host_template ixp4xx_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_jmicron.c +1 -1
@@ -107,7 +107,7 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline)/* No PIO or DMA methods needed for this device */ -static struct scsi_host_template jmicron_sht = { +static const struct scsi_host_template jmicron_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_legacy.c +1 -1
@@ -250,7 +250,7 @@ static int legacy_set_mode(struct ata_link *link, struct ata_device **unused)return 0 ; } -static struct scsi_host_template legacy_sht = { +static const struct scsi_host_template legacy_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_macio.c +1 -1
@@ -908,7 +908,7 @@ static int pata_macio_do_resume(struct pata_macio_priv *priv) }#endif /* CONFIG_PM_SLEEP */ -static struct scsi_host_template pata_macio_sht = { +static const struct scsi_host_template pata_macio_sht = {__ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =MAX_DCMDS ,/* We may not need that strict one */
drivers/ata/pata_marvell.c +1 -1
@@ -92,7 +92,7 @@ static int marvell_cable_detect(struct ata_port *ap)/* No PIO or DMA methods needed for this device */ -static struct scsi_host_template marvell_sht = { +static const struct scsi_host_template marvell_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_mpc52xx.c +1 -1
@@ -606,7 +606,7 @@ mpc52xx_ata_task_irq(int irq, void *vpriv)return IRQ_HANDLED ; } -static struct scsi_host_template mpc52xx_ata_sht = { +static const struct scsi_host_template mpc52xx_ata_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_mpiix.c +1 -1
@@ -136,7 +136,7 @@ static unsigned int mpiix_qc_issue(struct ata_queued_cmd *qc)return ata_sff_qc_issue (qc); } -static struct scsi_host_template mpiix_sht = { +static const struct scsi_host_template mpiix_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_netcell.c +1 -1
@@ -31,7 +31,7 @@ static unsigned int netcell_read_id(struct ata_device *adev,return err_mask; } -static struct scsi_host_template netcell_sht = { +static const struct scsi_host_template netcell_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_ninja32.c +1 -1
@@ -77,7 +77,7 @@ static void ninja32_dev_select(struct ata_port *ap, unsigned int device) } } -static struct scsi_host_template ninja32_sht = { +static const struct scsi_host_template ninja32_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_ns87410.c +1 -1
@@ -114,7 +114,7 @@ static unsigned int ns87410_qc_issue(struct ata_queued_cmd *qc)return ata_sff_qc_issue (qc); } -static struct scsi_host_template ns87410_sht = { +static const struct scsi_host_template ns87410_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_ns87415.c +1 -1
@@ -320,7 +320,7 @@ static struct ata_port_operations ns87560_pata_ops = { };#endif -static struct scsi_host_template ns87415_sht = { +static const struct scsi_host_template ns87415_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_octeon_cf.c +1 -1
@@ -58,7 +58,7 @@ struct octeon_cf_port {u64 dma_base; }; -static struct scsi_host_template octeon_cf_sht = { +static const struct scsi_host_template octeon_cf_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_of_platform.c +1 -1
@@ -15,7 +15,7 @@#define DRV_NAME "pata_of_platform" -static struct scsi_host_template pata_platform_sht = { +static const struct scsi_host_template pata_platform_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_oldpiix.c +1 -1
@@ -204,7 +204,7 @@ static unsigned int oldpiix_qc_issue(struct ata_queued_cmd *qc) } -static struct scsi_host_template oldpiix_sht = { +static const struct scsi_host_template oldpiix_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_opti.c +1 -1
@@ -148,7 +148,7 @@ static void opti_set_piomode(struct ata_port *ap, struct ata_device *adev)opti_write_reg (ap,0x85 ,CNTRL_REG ); } -static struct scsi_host_template opti_sht = { +static const struct scsi_host_template opti_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_optidma.c +1 -1
@@ -334,7 +334,7 @@ static int optidma_set_mode(struct ata_link *link, struct ata_device **r_failed)return rc; } -static struct scsi_host_template optidma_sht = { +static const struct scsi_host_template optidma_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_parport/pata_parport.c +1 -1
@@ -398,7 +398,7 @@ static struct device pata_parport_bus = { .release = pata_parport_bus_release, }; -static struct scsi_host_template pata_parport_sht = { +static const struct scsi_host_template pata_parport_sht = {PATA_PARPORT_SHT ("pata_parport" ) };
drivers/ata/pata_pcmcia.c +1 -1
@@ -132,7 +132,7 @@ static void pcmcia_8bit_drain_fifo(struct ata_queued_cmd *qc) } -static struct scsi_host_template pcmcia_sht = { +static const struct scsi_host_template pcmcia_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_pdc2027x.c +1 -1
@@ -122,7 +122,7 @@ static struct pci_driver pdc2027x_pci_driver = {#endif }; -static struct scsi_host_template pdc2027x_sht = { +static const struct scsi_host_template pdc2027x_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_pdc202xx_old.c +1 -1
@@ -289,7 +289,7 @@ static int pdc2026x_check_atapi_dma(struct ata_queued_cmd *qc)return 1 ; } -static struct scsi_host_template pdc202xx_sht = { +static const struct scsi_host_template pdc202xx_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_piccolo.c +1 -1
@@ -62,7 +62,7 @@ static void tosh_set_dmamode(struct ata_port *ap, struct ata_device *adev) } -static struct scsi_host_template tosh_sht = { +static const struct scsi_host_template tosh_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_platform.c +2 -2
@@ -45,7 +45,7 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unureturn 0 ; } -static struct scsi_host_template pata_platform_sht = { +static const struct scsi_host_template pata_platform_sht = {ATA_PIO_SHT (DRV_NAME ), };
@@ -97,7 +97,7 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,int __pata_platform_probe (struct device *dev,struct resource *io_res,struct resource *ctl_res,struct resource *irq_res,unsigned int ioport_shift,int __pio_mask, -struct scsi_host_template *sht,bool use16bit) +const struct scsi_host_template *sht,bool use16bit) {struct ata_host *host;struct ata_port *ap;
drivers/ata/pata_pxa.c +1 -1
@@ -136,7 +136,7 @@ static int pxa_check_atapi_dma(struct ata_queued_cmd *qc)return -EOPNOTSUPP ; } -static struct scsi_host_template pxa_ata_sht = { +static const struct scsi_host_template pxa_ata_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_radisys.c +1 -1
@@ -183,7 +183,7 @@ static unsigned int radisys_qc_issue(struct ata_queued_cmd *qc) } -static struct scsi_host_template radisys_sht = { +static const struct scsi_host_template radisys_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_rb532_cf.c +1 -1
@@ -73,7 +73,7 @@ static struct ata_port_operations rb532_pata_port_ops = {/* ------------------------------------------------------------------------ */ -static struct scsi_host_template rb532_pata_sht = { +static const struct scsi_host_template rb532_pata_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_rdc.c +1 -1
@@ -288,7 +288,7 @@ static const struct ata_port_info rdc_port_info = { .port_ops = &rdc_pata_ops, }; -static struct scsi_host_template rdc_sht = { +static const struct scsi_host_template rdc_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_rz1000.c +1 -1
@@ -50,7 +50,7 @@ static int rz1000_set_mode(struct ata_link *link, struct ata_device **unused) } -static struct scsi_host_template rz1000_sht = { +static const struct scsi_host_template rz1000_sht = {ATA_PIO_SHT (DRV_NAME ), };
drivers/ata/pata_sc1200.c +1 -1
@@ -192,7 +192,7 @@ static int sc1200_qc_defer(struct ata_queued_cmd *qc)return 0 ; } -static struct scsi_host_template sc1200_sht = { +static const struct scsi_host_template sc1200_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_DUMB_MAX_PRD , .dma_boundary =ATA_DMA_BOUNDARY ,
drivers/ata/pata_sch.c +1 -1
@@ -57,7 +57,7 @@ static struct pci_driver sch_pci_driver = {#endif }; -static struct scsi_host_template sch_sht = { +static const struct scsi_host_template sch_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_serverworks.c +3 -3
@@ -252,13 +252,13 @@ static void serverworks_set_dmamode(struct ata_port *ap, struct ata_device *adevpci_write_config_byte (pdev,0x54 , ultra_cfg); } -static struct scsi_host_template serverworks_osb4_sht = { +static const struct scsi_host_template serverworks_osb4_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_DUMB_MAX_PRD , .dma_boundary =ATA_DMA_BOUNDARY , }; -static struct scsi_host_template serverworks_csb_sht = { +static const struct scsi_host_template serverworks_csb_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
@@ -413,7 +413,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id } };const struct ata_port_info *ppi[] = { &info[id->driver_data],NULL }; -struct scsi_host_template *sht = &serverworks_csb_sht; +const struct scsi_host_template *sht = &serverworks_csb_sht;int rc; rc =pcim_enable_device (pdev);
drivers/ata/pata_sil680.c +1 -1
@@ -223,7 +223,7 @@ static bool sil680_sff_irq_check(struct ata_port *ap)return val &0x08 ; } -static struct scsi_host_template sil680_sht = { +static const struct scsi_host_template sil680_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_sis.c +1 -1
@@ -539,7 +539,7 @@ static unsigned int sis_133_mode_filter(struct ata_device *adev, unsigned int mareturn mask; } -static struct scsi_host_template sis_sht = { +static const struct scsi_host_template sis_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_sl82c105.c +1 -1
@@ -238,7 +238,7 @@ static bool sl82c105_sff_irq_check(struct ata_port *ap)return val & mask; } -static struct scsi_host_template sl82c105_sht = { +static const struct scsi_host_template sl82c105_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_triflex.c +1 -1
@@ -160,7 +160,7 @@ static void triflex_bmdma_stop(struct ata_queued_cmd *qc)triflex_load_timing (qc->ap, qc->dev, qc->dev->pio_mode); } -static struct scsi_host_template triflex_sht = { +static const struct scsi_host_template triflex_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pata_via.c +1 -1
@@ -443,7 +443,7 @@ static int via_port_start(struct ata_port *ap)return 0 ; } -static struct scsi_host_template via_sht = { +static const struct scsi_host_template via_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/pdc_adma.c +1 -1
@@ -123,7 +123,7 @@ static void adma_freeze(struct ata_port *ap);static void adma_thaw (struct ata_port *ap);static int adma_prereset (struct ata_link *link,unsigned long deadline); -static struct scsi_host_template adma_ata_sht = { +static const struct scsi_host_template adma_ata_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_MAX_PRD , .dma_boundary =ADMA_DMA_BOUNDARY ,
drivers/ata/sata_dwc_460ex.c +1 -1
@@ -1076,7 +1076,7 @@ static void sata_dwc_dev_select(struct ata_port *ap, unsigned int device)/* * scsi mid-layer and libata interface structures */ -static struct scsi_host_template sata_dwc_sht = { +static const struct scsi_host_template sata_dwc_sht = {ATA_NCQ_SHT (DRV_NAME ),/* * test-only: Currently this driver doesn't handle NCQ
drivers/ata/sata_fsl.c +1 -1
@@ -1376,7 +1376,7 @@ static void sata_fsl_host_stop(struct ata_host *host)/* * scsi mid-layer and libata interface structures */ -static struct scsi_host_template sata_fsl_sht = { +static const struct scsi_host_template sata_fsl_sht = {ATA_NCQ_SHT_QD ("sata_fsl" ,SATA_FSL_QUEUE_DEPTH ), .sg_tablesize =SATA_FSL_MAX_PRD_USABLE , .dma_boundary =ATA_DMA_BOUNDARY ,
drivers/ata/sata_highbank.c +1 -1
@@ -438,7 +438,7 @@ static const struct ata_port_info ahci_highbank_port_info = { .port_ops = &ahci_highbank_ops, }; -static struct scsi_host_template ahci_highbank_platform_sht = { +static const struct scsi_host_template ahci_highbank_platform_sht = {AHCI_SHT ("sata_highbank" ), };
drivers/ata/sata_inic162x.c +1 -1
@@ -242,7 +242,7 @@ struct inic_port_priv {dma_addr_t cpb_tbl_dma; }; -static struct scsi_host_template inic_sht = { +static const struct scsi_host_template inic_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_MAX_PRD ,/* maybe it can be larger? */
drivers/ata/sata_mv.c +2 -2
@@ -659,13 +659,13 @@ static u8 mv_sff_check_status(struct ata_port *ap);* PRDs for 64K boundaries in mv_fill_sg(). */ #ifdef CONFIG_PCI -static struct scsi_host_template mv5_sht = { +static const struct scsi_host_template mv5_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =MV_MAX_SG_CT /2 , .dma_boundary =MV_DMA_BOUNDARY , };#endif -static struct scsi_host_template mv6_sht = { +static const struct scsi_host_template mv6_sht = {__ATA_BASE_SHT (DRV_NAME ), .can_queue =MV_MAX_Q_DEPTH -1 , .sg_tablesize =MV_MAX_SG_CT /2 ,
drivers/ata/sata_nv.c +4 -4
@@ -371,11 +371,11 @@ static struct pci_driver nv_pci_driver = { .remove = ata_pci_remove_one, }; -static struct scsi_host_template nv_sht = { +static const struct scsi_host_template nv_sht = {ATA_BMDMA_SHT (DRV_NAME ), }; -static struct scsi_host_template nv_adma_sht = { +static const struct scsi_host_template nv_adma_sht = {__ATA_BASE_SHT (DRV_NAME ), .can_queue =NV_ADMA_MAX_CPBS , .sg_tablesize =NV_ADMA_SGTBL_TOTAL_LEN ,
@@ -386,7 +386,7 @@ static struct scsi_host_template nv_adma_sht = { .tag_alloc_policy = BLK_TAG_ALLOC_RR, }; -static struct scsi_host_template nv_swncq_sht = { +static const struct scsi_host_template nv_swncq_sht = {__ATA_BASE_SHT (DRV_NAME ), .can_queue =ATA_MAX_QUEUE -1 , .sg_tablesize =LIBATA_MAX_PRD ,
@@ -520,7 +520,7 @@ static struct ata_port_operations nv_swncq_ops = {struct nv_pi_priv {irq_handler_t irq_handler; -struct scsi_host_template *sht; +const struct scsi_host_template *sht; };#define NV_PI_PRIV (_irq_handler, _sht) \
drivers/ata/sata_promise.c +1 -1
@@ -158,7 +158,7 @@ static void pdc_error_handler(struct ata_port *ap);static void pdc_post_internal_cmd (struct ata_queued_cmd *qc);static int pdc_pata_cable_detect (struct ata_port *ap); -static struct scsi_host_template pdc_ata_sht = { +static const struct scsi_host_template pdc_ata_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =PDC_MAX_PRD , .dma_boundary =ATA_DMA_BOUNDARY ,
drivers/ata/sata_qstor.c +1 -1
@@ -108,7 +108,7 @@ static void qs_thaw(struct ata_port *ap);static int qs_prereset (struct ata_link *link,unsigned long deadline);static void qs_error_handler (struct ata_port *ap); -static struct scsi_host_template qs_ata_sht = { +static const struct scsi_host_template qs_ata_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =QS_MAX_PRD , .dma_boundary =QS_DMA_BOUNDARY ,
drivers/ata/sata_rcar.c +1 -1
@@ -608,7 +608,7 @@ static u8 sata_rcar_bmdma_status(struct ata_port *ap)return host_stat; } -static struct scsi_host_template sata_rcar_sht = { +static const struct scsi_host_template sata_rcar_sht = {ATA_BASE_SHT (DRV_NAME ),/* * This controller allows transfer chunks up to 512MB which cross 64KB
drivers/ata/sata_sil.c +1 -1
@@ -156,7 +156,7 @@ static struct pci_driver sil_pci_driver = {#endif }; -static struct scsi_host_template sil_sht = { +static const struct scsi_host_template sil_sht = {ATA_BASE_SHT (DRV_NAME ),/** These controllers support Large Block Transfer which allows transfer chunks up to 2GB and which cross 64KB boundaries,
drivers/ata/sata_sil24.c +1 -1
@@ -373,7 +373,7 @@ static struct pci_driver sil24_pci_driver = {#endif }; -static struct scsi_host_template sil24_sht = { +static const struct scsi_host_template sil24_sht = {__ATA_BASE_SHT (DRV_NAME ), .can_queue =SIL24_MAX_CMDS , .sg_tablesize =SIL24_MAX_SGE ,
drivers/ata/sata_sis.c +1 -1
@@ -72,7 +72,7 @@ static struct pci_driver sis_pci_driver = {#endif }; -static struct scsi_host_template sis_sht = { +static const struct scsi_host_template sis_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/sata_svw.c +1 -1
@@ -330,7 +330,7 @@ static int k2_sata_show_info(struct seq_file *m, struct Scsi_Host *shost)return 0 ; } -static struct scsi_host_template k2_sata_sht = { +static const struct scsi_host_template k2_sata_sht = {ATA_BMDMA_SHT (DRV_NAME ), .show_info = k2_sata_show_info, };
drivers/ata/sata_sx4.c +1 -1
@@ -226,7 +226,7 @@ static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);static int pdc_check_atapi_dma (struct ata_queued_cmd *qc); -static struct scsi_host_template pdc_sata_sht = { +static const struct scsi_host_template pdc_sata_sht = {ATA_BASE_SHT (DRV_NAME ), .sg_tablesize =LIBATA_MAX_PRD , .dma_boundary =ATA_DMA_BOUNDARY ,
drivers/ata/sata_uli.c +1 -1
@@ -59,7 +59,7 @@ static struct pci_driver uli_pci_driver = { .remove = ata_pci_remove_one, }; -static struct scsi_host_template uli_sht = { +static const struct scsi_host_template uli_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/sata_via.c +1 -1
@@ -107,7 +107,7 @@ static struct pci_driver svia_pci_driver = { .remove = ata_pci_remove_one, }; -static struct scsi_host_template svia_sht = { +static const struct scsi_host_template svia_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
drivers/ata/sata_vsc.c +1 -1
@@ -277,7 +277,7 @@ static irqreturn_t vsc_sata_interrupt(int irq, void *dev_instance) } -static struct scsi_host_template vsc_sata_sht = { +static const struct scsi_host_template vsc_sata_sht = {ATA_BMDMA_SHT (DRV_NAME ), };
include/linux/ahci_platform.h +1 -1
@@ -37,7 +37,7 @@ struct ahci_host_priv *ahci_platform_get_resources(int ahci_platform_init_host (struct platform_device *pdev,struct ahci_host_priv *hpriv,const struct ata_port_info *pi_template, -struct scsi_host_template *sht); +const struct scsi_host_template *sht);void ahci_platform_shutdown (struct platform_device *pdev);
include/linux/ata_platform.h +1 -1
@@ -19,7 +19,7 @@ extern int __pata_platform_probe(struct device *dev,struct resource *irq_res, unsigned int ioport_shift, int __pio_mask, - struct scsi_host_template *sht, + const struct scsi_host_template *sht, bool use16bit);/*
include/linux/libata.h +5 -5
@@ -1065,10 +1065,10 @@ extern void ata_host_get(struct ata_host *host);extern void ata_host_put (struct ata_host *host);extern int ata_host_start (struct ata_host *host);extern int ata_host_register (struct ata_host *host, -struct scsi_host_template *sht); +const struct scsi_host_template *sht);extern int ata_host_activate (struct ata_host *host,int irq,irq_handler_t irq_handler,unsigned long irq_flags, -struct scsi_host_template *sht); +const struct scsi_host_template *sht);extern void ata_host_detach (struct ata_host *host);extern void ata_host_init (struct ata_host *,struct device *,struct ata_port_operations *);extern int ata_scsi_detect (struct scsi_host_template *sht);
@@ -1980,10 +1980,10 @@ extern int ata_pci_sff_prepare_host(struct pci_dev *pdev, struct ata_host **r_host);extern int ata_pci_sff_activate_host (struct ata_host *host,irq_handler_t irq_handler, -struct scsi_host_template *sht); +const struct scsi_host_template *sht);extern int ata_pci_sff_init_one (struct pci_dev *pdev,const struct ata_port_info *const * ppi, -struct scsi_host_template *sht,void *host_priv,int hflags); +const struct scsi_host_template *sht,void *host_priv,int hflags);#endif /* CONFIG_PCI */ #ifdef CONFIG_ATA_BMDMA
@@ -2019,7 +2019,7 @@ extern int ata_pci_bmdma_prepare_host(struct pci_dev *pdev, struct ata_host **r_host);extern int ata_pci_bmdma_init_one (struct pci_dev *pdev,const struct ata_port_info *const * ppi, -struct scsi_host_template *sht, +const struct scsi_host_template *sht,void *host_priv,int hflags);#endif /* CONFIG_PCI */ #endif /* CONFIG_ATA_BMDMA */
Bart Van Assche
maintainerPATCH v3 5/80 firewire: sbp2: Declare the SCSI host template const
In reply to Bart Van AsscheMake it explicit that the sbp2 host template it not modified.
--- drivers/firewire/sbp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firewire/sbp2.c +2 -2
@@ -1117,7 +1117,7 @@ static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model, tgt->workarounds = w; } -static struct scsi_host_template scsi_driver_template; +static const struct scsi_host_template scsi_driver_template;static void sbp2_remove (struct fw_unit *unit);static int sbp2_probe (struct fw_unit *unit,const struct ieee1394_device_id *id)
@@ -1586,7 +1586,7 @@ static struct attribute *sbp2_scsi_sysfs_attrs[] = {ATTRIBUTE_GROUPS (sbp2_scsi_sysfs); -static struct scsi_host_template scsi_driver_template = { +static const struct scsi_host_template scsi_driver_template = { .module =THIS_MODULE , .name ="SBP-2 IEEE-1394" , .proc_name ="sbp2" ,
Bart Van Assche
maintainerPATCH v3 6/80 RDMA/srp: Declare the SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SRP host template is not modified.
--- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/ulp/srp/ib_srp.c +1 -1
@@ -3077,7 +3077,7 @@ static struct attribute *srp_host_attrs[] = {ATTRIBUTE_GROUPS (srp_host); -static struct scsi_host_template srp_template = { +static const struct scsi_host_template srp_template = { .module =THIS_MODULE , .name ="InfiniBand SRP initiator" , .proc_name =DRV_NAME ,
Bart Van Assche
maintainerPATCH v3 7/80 scsi: message: fusion: Declare SCSI host template members const
In reply to Bart Van AsscheMake it explicit that the SCSI host templates are not modified.
--- drivers/message/fusion/mptfc.c | 2 +- drivers/message/fusion/mptsas.c | 2 +- drivers/message/fusion/mptspi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/message/fusion/mptfc.c +1 -1
@@ -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,
drivers/message/fusion/mptsas.c +1 -1
@@ -1997,7 +1997,7 @@ static enum scsi_timeout_action mptsas_eh_timed_out(struct scsi_cmnd *sc) } -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,
drivers/message/fusion/mptspi.c +1 -1
@@ -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,
Bart Van Assche
maintainerPATCH v3 8/80 scsi: zfcp: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/s390/scsi/zfcp_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/scsi/zfcp_scsi.c +1 -1
@@ -418,7 +418,7 @@ static int zfcp_scsi_sysfs_host_reset(struct Scsi_Host *shost, int reset_type)struct scsi_transport_template *zfcp_scsi_transport_template; -static struct scsi_host_template zfcp_scsi_host_template = { +static const struct scsi_host_template zfcp_scsi_host_template = { .module =THIS_MODULE , .name ="zfcp" , .queuecommand = zfcp_scsi_queuecommand,
Bart Van Assche
maintainerPATCH v3 9/80 scsi: 3w-9xxx: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/3w-9xxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/3w-9xxx.c +1 -2
@@ -1976,8 +1976,7 @@ static int twa_slave_configure(struct scsi_device *sdev)return 0 ; }/* End twa_slave_configure() */ -/* scsi_host_template initializer */ -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .name ="3ware 9000 Storage Controller" , .queuecommand = twa_scsi_queue,
Bart Van Assche
maintainerPATCH v3 10/80 scsi: 3w-sas: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/3w-sas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/3w-sas.c +1 -2
@@ -1530,8 +1530,7 @@ static int twl_slave_configure(struct scsi_device *sdev)return 0 ; }/* End twl_slave_configure() */ -/* scsi_host_template initializer */ -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .name ="3w-sas" , .queuecommand = twl_scsi_queue,
Bart Van Assche
maintainerPATCH v3 11/80 scsi: 3w-xxxx: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/3w-xxxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/3w-xxxx.c +1 -1
@@ -2229,7 +2229,7 @@ static int tw_slave_configure(struct scsi_device *sdev)return 0 ; }/* End tw_slave_configure() */ -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .name ="3ware Storage Controller" , .queuecommand = tw_scsi_queue,
Bart Van Assche
maintainerPATCH v3 12/80 scsi: BusLogic: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/BusLogic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/BusLogic.c +2 -2
@@ -54,7 +54,7 @@#define FAILURE (-1)#endif -static struct scsi_host_template blogic_template; +static const struct scsi_host_template blogic_template;/* blogic_drvr_options_count is a count of the number of BusLogic Driver
@@ -3663,7 +3663,7 @@ static int __init blogic_parseopts(char *options)Get it all started */ -static struct scsi_host_template blogic_template = { +static const struct scsi_host_template blogic_template = { .module =THIS_MODULE , .proc_name ="BusLogic" , .write_info = blogic_write_info,
Bart Van Assche
maintainerPATCH v3 13/80 scsi: a100u2w: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/a100u2w.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/a100u2w.c +1 -1
@@ -1065,7 +1065,7 @@ static irqreturn_t inia100_intr(int irqno, void *devid)return res; } -static struct scsi_host_template inia100_template = { +static const struct scsi_host_template inia100_template = { .proc_name ="inia100" , .name = inia100_REVID, .queuecommand = inia100_queue,
Bart Van Assche
maintainerPATCH v3 14/80 scsi: a2091: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/a2091.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/a2091.c +1 -1
@@ -180,7 +180,7 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, } } -static struct scsi_host_template a2091_scsi_template = { +static const struct scsi_host_template a2091_scsi_template = { .module =THIS_MODULE , .name ="Commodore A2091/A590 SCSI" , .show_info = wd33c93_show_info,
Bart Van Assche
maintainerPATCH v3 15/80 scsi: a3000: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/a3000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/a3000.c +1 -1
@@ -197,7 +197,7 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, } } -static struct scsi_host_template amiga_a3000_scsi_template = { +static const struct scsi_host_template amiga_a3000_scsi_template = { .module =THIS_MODULE , .name ="Amiga 3000 built-in SCSI" , .show_info = wd33c93_show_info,
Bart Van Assche
maintainerPATCH v3 16/80 scsi: aacraid: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/aacraid/linit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/aacraid/linit.c +1 -1
@@ -1475,7 +1475,7 @@ static const struct file_operations aac_cfg_fops = { .llseek = noop_llseek, }; -static struct scsi_host_template aac_driver_template = { +static const struct scsi_host_template aac_driver_template = { .module =THIS_MODULE , .name ="AAC" , .proc_name =AAC_DRIVERNAME ,
Bart Van Assche
maintainerPATCH v3 17/80 scsi: advansys: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/advansys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/advansys.c +1 -1
@@ -10602,7 +10602,7 @@ static int AdvInitGetConfig(struct pci_dev *pdev, struct Scsi_Host *shost) }#endif -static struct scsi_host_template advansys_template = { +static const struct scsi_host_template advansys_template = { .proc_name =DRV_NAME , #ifdef CONFIG_PROC_FS .show_info = advansys_show_info,
Bart Van Assche
maintainerPATCH v3 18/80 scsi: aha152x: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/aha152x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/aha152x.c +2 -2
@@ -400,7 +400,7 @@ MODULE_DEVICE_TABLE(isapnp, id_table);#endif /* !AHA152X_PCMCIA */ -static struct scsi_host_template aha152x_driver_template; +static const struct scsi_host_template aha152x_driver_template;/* * internal states of the host
@@ -2946,7 +2946,7 @@ static int aha152x_adjust_queue(struct scsi_device *device)return 0 ; } -static struct scsi_host_template aha152x_driver_template = { +static const struct scsi_host_template aha152x_driver_template = { .module =THIS_MODULE , .name =AHA152X_REVID , .proc_name ="aha152x" ,
Bart Van Assche
maintainerPATCH v3 19/80 scsi: aha1542: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/aha1542.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/aha1542.c +3 -2
@@ -737,7 +737,8 @@ static void aha1542_set_bus_times(struct Scsi_Host *sh, int bus_on, int bus_off, }/* return non-zero on detection */ -static struct Scsi_Host *aha1542_hw_init (struct scsi_host_template *tpnt,struct device *pdev,int indx) +static struct Scsi_Host *aha1542_hw_init (const struct scsi_host_template *tpnt, +struct device *pdev,int indx) {unsigned int base_io = io[indx];struct Scsi_Host *sh;
@@ -1031,7 +1032,7 @@ static int aha1542_exit_cmd_priv(struct Scsi_Host *shost, struct scsi_cmnd *cmd)return 0 ; } -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .proc_name ="aha1542" , .name ="Adaptec 1542" ,
Bart Van Assche
maintainerPATCH v3 20/80 scsi: aic94xx: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/aic94xx/aic94xx_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/aic94xx/aic94xx_init.c +1 -1
@@ -35,7 +35,7 @@ static struct scsi_transport_template *aic94xx_transport_template;static int asd_scan_finished (struct Scsi_Host *,unsigned long );static void asd_scan_start (struct Scsi_Host *); -static struct scsi_host_template aic94xx_sht = { +static const struct scsi_host_template aic94xx_sht = { .module =THIS_MODULE ,/* .name is initialized */ .name ="aic94xx" ,
Bart Van Assche
maintainerPATCH v3 21/80 scsi: arcmsr: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arcmsr/arcmsr_hba.c +1 -1
@@ -151,7 +151,7 @@ static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev, int queue_dereturn scsi_change_queue_depth (sdev, queue_depth); } -static struct scsi_host_template arcmsr_scsi_host_template = { +static const struct scsi_host_template arcmsr_scsi_host_template = { .module =THIS_MODULE , .name ="Areca SAS/SATA RAID driver" , .info = arcmsr_info,
Bart Van Assche
maintainerPATCH v3 22/80 scsi: acornscsi: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/arm/acornscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/acornscsi.c +1 -1
@@ -2780,7 +2780,7 @@ static int acornscsi_show_info(struct seq_file *m, struct Scsi_Host *instance)return 0 ; } -static struct scsi_host_template acornscsi_template = { +static const struct scsi_host_template acornscsi_template = { .module =THIS_MODULE , .show_info = acornscsi_show_info, .name ="AcornSCSI" ,
Bart Van Assche
maintainerPATCH v3 23/80 scsi: arxescsi: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/arm/arxescsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/arxescsi.c +1 -1
@@ -238,7 +238,7 @@ arxescsi_show_info(struct seq_file *m, struct Scsi_Host *host)return 0 ; } -static struct scsi_host_template arxescsi_template = { +static const struct scsi_host_template arxescsi_template = { .show_info = arxescsi_show_info, .name ="ARXE SCSI card" , .info = arxescsi_info,
Bart Van Assche
maintainerPATCH v3 24/80 scsi: aha1740: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/aha1740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/aha1740.c +1 -1
@@ -543,7 +543,7 @@ static int aha1740_eh_abort_handler (struct scsi_cmnd *dummy)return SUCCESS ; } -static struct scsi_host_template aha1740_template = { +static const struct scsi_host_template aha1740_template = { .module =THIS_MODULE , .proc_name ="aha1740" , .show_info = aha1740_show_info,
Bart Van Assche
maintainerPATCH v3 25/80 scsi: cumana: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/arm/cumana_1.c | 2 +- drivers/scsi/arm/cumana_2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/arm/cumana_1.c +1 -1
@@ -211,7 +211,7 @@ static void cumanascsi_write(struct NCR5380_hostdata *hostdata,#include "../NCR5380.c" -static struct scsi_host_template cumanascsi_template = { +static const struct scsi_host_template cumanascsi_template = { .module =THIS_MODULE , .name ="Cumana 16-bit SCSI" , .info = cumanascsi_info,
drivers/scsi/arm/cumana_2.c +1 -1
@@ -356,7 +356,7 @@ static int cumanascsi_2_show_info(struct seq_file *m, struct Scsi_Host *host)return 0 ; } -static struct scsi_host_template cumanascsi2_template = { +static const struct scsi_host_template cumanascsi2_template = { .module =THIS_MODULE , .show_info = cumanascsi_2_show_info, .write_info = cumanascsi_2_set_proc_info,
Bart Van Assche
maintainerPATCH v3 26/80 scsi: eesox: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/arm/eesox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/eesox.c +1 -1
@@ -473,7 +473,7 @@ static ssize_t eesoxscsi_store_term(struct device *dev, struct device_attribute static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR, eesoxscsi_show_term, eesoxscsi_store_term); -static struct scsi_host_template eesox_template = { +static const struct scsi_host_template eesox_template = { .module =THIS_MODULE , .show_info = eesoxscsi_show_info, .write_info = eesoxscsi_set_proc_info,
Bart Van Assche
maintainerPATCH v3 27/80 scsi: oak: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/arm/oak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/oak.c +1 -1
@@ -100,7 +100,7 @@ printk("reading %p len %d\n", addr, len);#include "../NCR5380.c" -static struct scsi_host_template oakscsi_template = { +static const struct scsi_host_template oakscsi_template = { .module =THIS_MODULE , .name ="Oak 16-bit SCSI" , .info = oakscsi_info,
Bart Van Assche
maintainerPATCH v3 28/80 scsi: powertec: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/arm/powertec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/arm/powertec.c +1 -1
@@ -279,7 +279,7 @@ powertecscsi_store_term(struct device *dev, struct device_attribute *attr, const static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR, powertecscsi_show_term, powertecscsi_store_term); -static struct scsi_host_template powertecscsi_template = { +static const struct scsi_host_template powertecscsi_template = { .module =THIS_MODULE , .show_info = powertecscsi_show_info, .write_info = powertecscsi_set_proc_info,
Bart Van Assche
maintainerPATCH v3 29/80 scsi: atp870u: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/atp870u.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/atp870u.c +2 -2
@@ -40,7 +40,7 @@#include "atp870u.h" -static struct scsi_host_template atp870u_template; +static const struct scsi_host_template atp870u_template;static void send_s870 (struct atp_unit *dev,unsigned char c);static void atp_is (struct atp_unit *dev,unsigned char c,bool wide_chip,unsigned char lvdmode);
@@ -1726,7 +1726,7 @@ static void atp870u_remove (struct pci_dev *pdev) }MODULE_LICENSE ("GPL" ); -static struct scsi_host_template atp870u_template = { +static const struct scsi_host_template atp870u_template = { .module =THIS_MODULE , .name ="atp870u" /* name */ , .proc_name ="atp870u" ,
Bart Van Assche
maintainerPATCH v3 30/80 scsi: dc395x: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/dc395x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/dc395x.c +1 -1
@@ -4541,7 +4541,7 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) } -static struct scsi_host_template dc395x_driver_template = { +static const struct scsi_host_template dc395x_driver_template = { .module =THIS_MODULE , .proc_name =DC395X_NAME , .show_info = dc395x_show_info,
Re: [PATCH v3 30/80] scsi: dc395x: Declare SCSI host template const
Quoted 3 lines · Bart Van Assche
Make it explicit that the SCSI host template is not modified.
Signed-off-by Bart Van Assche <[email protected]>
Bart Van Assche
maintainerPATCH v3 31/80 scsi: dmx3191d: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/dmx3191d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/dmx3191d.c +1 -1
@@ -39,7 +39,7 @@#define DMX3191D_REGION_LEN 8 -static struct scsi_host_template dmx3191d_driver_template = { +static const struct scsi_host_template dmx3191d_driver_template = { .module =THIS_MODULE , .proc_name =DMX3191D_DRIVER_NAME , .name ="Domex DMX3191D" ,
Bart Van Assche
maintainerPATCH v3 32/80 scsi: elx: efct: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/elx/efct/efct_xport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/elx/efct/efct_xport.c +1 -1
@@ -10,7 +10,7 @@static struct dentry *efct_debugfs_root;static atomic_t efct_debugfs_count; -static struct scsi_host_template efct_template = { +static const struct scsi_host_template efct_template = { .module =THIS_MODULE , .name =EFCT_DRIVER_NAME , .supported_mode =MODE_TARGET ,
Bart Van Assche
maintainerPATCH v3 33/80 scsi: esas2r: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/esas2r/esas2r_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/esas2r/esas2r_main.c +1 -1
@@ -231,7 +231,7 @@ struct bin_attribute bin_attr_default_nvram = { .write = NULL }; -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .show_info = esas2r_show_info, .name =ESAS2R_LONGNAME ,
Bart Van Assche
maintainerPATCH v3 34/80 scsi: esp_scsi: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- 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(-)
drivers/scsi/am53c974.c +1 -1
@@ -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;
drivers/scsi/esp_scsi.c +1 -1
@@ -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,
drivers/scsi/esp_scsi.h +1 -1
@@ -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 *);
drivers/scsi/jazz_esp.c +1 -1
@@ -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;
drivers/scsi/mac_esp.c +1 -1
@@ -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;
drivers/scsi/sun3x_esp.c +1 -1
@@ -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;
drivers/scsi/sun_esp.c +1 -1
@@ -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;
drivers/scsi/zorro_esp.c +1 -1
@@ -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;
Bart Van Assche
maintainerPATCH v3 35/80 scsi: fcoe: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/fcoe/fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/fcoe/fcoe.c +1 -1
@@ -260,7 +260,7 @@ static struct fc_function_template fcoe_vport_fc_functions = { .bsg_request = fc_lport_bsg_request, }; -static struct scsi_host_template fcoe_shost_template = { +static const struct scsi_host_template fcoe_shost_template = { .module =THIS_MODULE , .name ="FCoE Driver" , .proc_name =FCOE_NAME ,
Bart Van Assche
maintainerPATCH v3 36/80 scsi: fnic: Declare host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/fnic/fnic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/fnic/fnic_main.c +1 -1
@@ -95,7 +95,7 @@ static int fnic_slave_alloc(struct scsi_device *sdev)return 0 ; } -static struct scsi_host_template fnic_host_template = { +static const struct scsi_host_template fnic_host_template = { .module =THIS_MODULE , .name =DRV_NAME , .queuecommand = fnic_queuecommand,
Bart Van Assche
maintainerPATCH v3 37/80 scsi: qedf: Declare host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qedf/qedf_main.c +1 -1
@@ -979,7 +979,7 @@ static int qedf_slave_configure(struct scsi_device *sdev)return 0 ; } -static struct scsi_host_template qedf_host_template = { +static const struct scsi_host_template qedf_host_template = { .module =THIS_MODULE , .name =QEDF_MODULE_NAME , .this_id =-1 ,
Bart Van Assche
maintainerPATCH v3 38/80 scsi: fdomain: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/fdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/fdomain.c +1 -1
@@ -496,7 +496,7 @@ static int fdomain_biosparam(struct scsi_device *sdev,return 0 ; } -static struct scsi_host_template fdomain_template = { +static const struct scsi_host_template fdomain_template = { .module =THIS_MODULE , .name ="Future Domain TMC-16x0" , .proc_name ="fdomain" ,
Bart Van Assche
maintainerPATCH v3 39/80 scsi: NCR5380: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/g_NCR5380.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/g_NCR5380.c +2 -2
@@ -219,7 +219,7 @@ static int hp_c2502_irqs[] = { 9, 5, 7, 3, 4, -1 }; -static int generic_NCR5380_init_one (struct scsi_host_template *tpnt, +static int generic_NCR5380_init_one (const struct scsi_host_template *tpnt,struct device *pdev,int base,int irq,int board) {bool is_pmio = base <=0xffff ;
@@ -689,7 +689,7 @@ static int generic_NCR5380_dma_residual(struct NCR5380_hostdata *hostdata)#include "NCR5380.c" -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .proc_name =DRV_MODULE_NAME , .name ="Generic NCR5380/NCR53C400 SCSI" ,
Bart Van Assche
maintainerPATCH v3 40/80 scsi: gvp11: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/gvp11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/gvp11.c +1 -1
@@ -222,7 +222,7 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, } } -static struct scsi_host_template gvp11_scsi_template = { +static const struct scsi_host_template gvp11_scsi_template = { .module =THIS_MODULE , .name ="GVP Series II SCSI" , .show_info = wd33c93_show_info,
Bart Van Assche
maintainerPATCH v3 41/80 scsi: hisi_sas: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/hisi_sas/hisi_sas.h +1 -1
@@ -345,7 +345,7 @@ struct hisi_sas_hw { int delay_ms, int timeout_ms);void (*debugfs_snapshot_regs)(struct hisi_hba *hisi_hba);int complete_hdr_size; -struct scsi_host_template *sht; +const struct scsi_host_template *sht; };#define HISI_SAS_MAX_DEBUGFS_DUMP (50)
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +1 -1
@@ -1735,7 +1735,7 @@ static struct attribute *host_v1_hw_attrs[] = {ATTRIBUTE_GROUPS (host_v1_hw); -static struct scsi_host_template sht_v1_hw = { +static const struct scsi_host_template sht_v1_hw = { .name =DRV_NAME , .proc_name =DRV_NAME , .module =THIS_MODULE ,
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +1 -1
@@ -3551,7 +3551,7 @@ static void map_queues_v2_hw(struct Scsi_Host *shost) } } -static struct scsi_host_template sht_v2_hw = { +static const struct scsi_host_template sht_v2_hw = { .name =DRV_NAME , .proc_name =DRV_NAME , .module =THIS_MODULE ,
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +1 -1
@@ -3282,7 +3282,7 @@ static void hisi_sas_map_queues(struct Scsi_Host *shost) } } -static struct scsi_host_template sht_v3_hw = { +static const struct scsi_host_template sht_v3_hw = { .name =DRV_NAME , .proc_name =DRV_NAME , .module =THIS_MODULE ,
Bart Van Assche
maintainerPATCH v3 42/80 scsi: hpsa: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/hpsa.c +1 -1
@@ -967,7 +967,7 @@ ATTRIBUTE_GROUPS(hpsa_shost);#define HPSA_NRESERVED_CMDS (HPSA_CMDS_RESERVED_FOR_DRIVER +\ HPSA_MAX_CONCURRENT_PASSTHRUS) -static struct scsi_host_template hpsa_driver_template = { +static const struct scsi_host_template hpsa_driver_template = { .module =THIS_MODULE , .name =HPSA , .proc_name =HPSA ,
Bart Van Assche
maintainerPATCH v3 43/80 scsi: hptiop: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/hptiop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/hptiop.c +1 -1
@@ -1159,7 +1159,7 @@ static int hptiop_slave_config(struct scsi_device *sdev)return 0 ; } -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .name = driver_name, .queuecommand = hptiop_queuecommand,
Bart Van Assche
maintainerPATCH v3 44/80 scsi: ibmvfc: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ibmvscsi/ibmvfc.c +1 -1
@@ -3611,7 +3611,7 @@ static struct attribute *ibmvfc_host_attrs[] = {ATTRIBUTE_GROUPS (ibmvfc_host); -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .name ="IBM POWER Virtual FC Adapter" , .proc_name =IBMVFC_NAME ,
Bart Van Assche
maintainerPATCH v3 45/80 scsi: imm: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/imm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/imm.c +1 -1
@@ -1096,7 +1096,7 @@ static int imm_adjust_queue(struct scsi_device *device)return 0 ; } -static struct scsi_host_template imm_template = { +static const struct scsi_host_template imm_template = { .module =THIS_MODULE , .proc_name ="imm" , .show_info = imm_show_info,
Bart Van Assche
maintainerPATCH v3 46/80 scsi: initio: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/initio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/initio.c +1 -1
@@ -2788,7 +2788,7 @@ static void i91uSCBPost(u8 * host_mem, u8 * cblk_mem)initio_release_scb (host, cblk);/* Release SCB for current channel */ } -static struct scsi_host_template initio_template = { +static const struct scsi_host_template initio_template = { .proc_name ="INI9100U" , .name ="Initio INI-9X00U/UW SCSI device driver" , .queuecommand = i91u_queuecommand,
Bart Van Assche
maintainerPATCH v3 47/80 scsi: ipr: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/ipr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ipr.c +1 -1
@@ -6736,7 +6736,7 @@ static const char *ipr_ioa_info(struct Scsi_Host *host)return buffer; } -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .name ="IPR" , .info = ipr_ioa_info,
Bart Van Assche
maintainerPATCH v3 48/80 scsi: isci: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the ISCI host template is not modified.
--- drivers/scsi/isci/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/isci/init.c +1 -1
@@ -149,7 +149,7 @@ static struct attribute *isci_host_attrs[] = {ATTRIBUTE_GROUPS (isci_host); -static struct scsi_host_template isci_sht = { +static const struct scsi_host_template isci_sht = { .module =THIS_MODULE , .name =DRV_NAME ,
Bart Van Assche
maintainerPATCH v3 49/80 scsi: iscsi: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/infiniband/ulp/iser/iscsi_iser.c | 4 ++-- drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/scsi/bnx2i/bnx2i_iscsi.c | 4 ++-- drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | 2 +- drivers/scsi/cxgbi/libcxgbi.c | 2 +- drivers/scsi/cxgbi/libcxgbi.h | 2 +- drivers/scsi/iscsi_tcp.c | 4 ++-- drivers/scsi/libiscsi.c | 2 +- drivers/scsi/qedi/qedi_gbl.h | 2 +- drivers/scsi/qedi/qedi_iscsi.c | 2 +- include/scsi/libiscsi.h | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-)
drivers/infiniband/ulp/iser/iscsi_iser.c +2 -2
@@ -78,7 +78,7 @@ MODULE_DESCRIPTION("iSER (iSCSI Extensions for RDMA) Datamover");MODULE_LICENSE ("Dual BSD/GPL" );MODULE_AUTHOR ("Alex Nezhinsky, Dan Bar Dov, Or Gerlitz" ); -static struct scsi_host_template iscsi_iser_sht; +static const struct scsi_host_template iscsi_iser_sht;static struct iscsi_transport iscsi_iser_transport;static struct scsi_transport_template *iscsi_iser_scsi_transport;static struct workqueue_struct *release_wq;
@@ -956,7 +956,7 @@ static umode_t iser_attr_is_visible(int param_type, int param)return 0 ; } -static struct scsi_host_template iscsi_iser_sht = { +static const struct scsi_host_template iscsi_iser_sht = { .module =THIS_MODULE , .name ="iSCSI Initiator over iSER" , .queuecommand = iscsi_queuecommand,
drivers/scsi/be2iscsi/be_main.c +1 -1
@@ -398,7 +398,7 @@ static const struct pci_device_id beiscsi_pci_id_table[] = {MODULE_DEVICE_TABLE (pci, beiscsi_pci_id_table); -static struct scsi_host_template beiscsi_sht = { +static const struct scsi_host_template beiscsi_sht = { .module =THIS_MODULE , .name ="Emulex 10Gbe open-iscsi Initiator Driver" , .proc_name =DRV_NAME ,
drivers/scsi/bnx2i/bnx2i_iscsi.c +2 -2
@@ -22,7 +22,7 @@struct scsi_transport_template *bnx2i_scsi_xport_template;struct iscsi_transport bnx2i_iscsi_transport; -static struct scsi_host_template bnx2i_host_template; +static const struct scsi_host_template bnx2i_host_template;/* * Global endpoint resource info
@@ -2250,7 +2250,7 @@ static umode_t bnx2i_attr_is_visible(int param_type, int param)* 'Scsi_Host_Template' structure and 'iscsi_tranport' structure template * used while registering with the scsi host and iSCSI transport module. */ -static struct scsi_host_template bnx2i_host_template = { +static const struct scsi_host_template bnx2i_host_template = { .module =THIS_MODULE , .name ="QLogic Offload iSCSI Initiator" , .proc_name ="bnx2i" ,
drivers/scsi/cxgbi/cxgb3i/cxgb3i.c +1 -1
@@ -80,7 +80,7 @@ static struct cxgb3_client t3_client = { .event_handler = cxgb3i_dev_event_handler, }; -static struct scsi_host_template cxgb3i_host_template = { +static const struct scsi_host_template cxgb3i_host_template = { .module =THIS_MODULE , .name =DRV_MODULE_NAME , .proc_name =DRV_MODULE_NAME ,
drivers/scsi/cxgbi/libcxgbi.c +1 -1
@@ -337,7 +337,7 @@ void cxgbi_hbas_remove(struct cxgbi_device *cdev)EXPORT_SYMBOL_GPL (cxgbi_hbas_remove);int cxgbi_hbas_add (struct cxgbi_device *cdev,u64 max_lun, -unsigned int max_conns,struct scsi_host_template *sht, +unsigned int max_conns,const struct scsi_host_template *sht,struct scsi_transport_template *stt) {struct cxgbi_hba *chba;
drivers/scsi/cxgbi/libcxgbi.h +1 -1
@@ -591,7 +591,7 @@ struct cxgbi_device *cxgbi_device_find_by_netdev(struct net_device *, int *);struct cxgbi_device *cxgbi_device_find_by_netdev_rcu (struct net_device *,int *);int cxgbi_hbas_add (struct cxgbi_device *,u64 ,unsigned int , -struct scsi_host_template *, +const struct scsi_host_template *,struct scsi_transport_template *);void cxgbi_hbas_remove (struct cxgbi_device *);
drivers/scsi/iscsi_tcp.c +2 -2
@@ -47,7 +47,7 @@ MODULE_DESCRIPTION("iSCSI/TCP data-path");MODULE_LICENSE ("GPL" );static struct scsi_transport_template *iscsi_sw_tcp_scsi_transport; -static struct scsi_host_template iscsi_sw_tcp_sht; +static const struct scsi_host_template iscsi_sw_tcp_sht;static struct iscsi_transport iscsi_sw_tcp_transport;static unsigned int iscsi_max_lun = ~0 ;
@@ -1072,7 +1072,7 @@ static int iscsi_sw_tcp_slave_configure(struct scsi_device *sdev)return 0 ; } -static struct scsi_host_template iscsi_sw_tcp_sht = { +static const struct scsi_host_template iscsi_sw_tcp_sht = { .module =THIS_MODULE , .name ="iSCSI Initiator over TCP/IP" , .queuecommand = iscsi_queuecommand,
drivers/scsi/libiscsi.c +1 -1
@@ -2895,7 +2895,7 @@ EXPORT_SYMBOL_GPL(iscsi_host_add);* This should be called by partial offload and software iscsi drivers. * To access the driver specific memory use the iscsi_host_priv() macro. */ -struct Scsi_Host *iscsi_host_alloc (struct scsi_host_template *sht, +struct Scsi_Host *iscsi_host_alloc (const struct scsi_host_template *sht,int dd_data_size,bool xmit_can_sleep) {struct Scsi_Host *shost;
drivers/scsi/qedi/qedi_gbl.h +1 -1
@@ -17,7 +17,7 @@ extern int qedi_do_not_recover;extern uint qedi_io_tracing; -extern struct scsi_host_template qedi_host_template; +extern const struct scsi_host_template qedi_host_template;extern struct iscsi_transport qedi_iscsi_transport;extern const struct qed_iscsi_ops *qedi_ops;extern const struct qedi_debugfs_ops qedi_debugfs_ops[];
drivers/scsi/qedi/qedi_iscsi.c +1 -1
@@ -40,7 +40,7 @@ static int qedi_eh_host_reset(struct scsi_cmnd *cmd)return qedi_recover_all_conns (qedi); } -struct scsi_host_template qedi_host_template = { +const struct scsi_host_template qedi_host_template = { .module =THIS_MODULE , .name ="QLogic QEDI 25/40/100Gb iSCSI Initiator Driver" , .proc_name =QEDI_MODULE_NAME ,
include/scsi/libiscsi.h +1 -1
@@ -407,7 +407,7 @@ extern int iscsi_host_set_param(struct Scsi_Host *shost,extern int iscsi_host_get_param (struct Scsi_Host *shost,enum iscsi_host_param param,char *buf);extern int iscsi_host_add (struct Scsi_Host *shost,struct device *pdev); -extern struct Scsi_Host *iscsi_host_alloc (struct scsi_host_template *sht, +extern struct Scsi_Host *iscsi_host_alloc (const struct scsi_host_template *sht,int dd_data_size,bool xmit_can_sleep);extern void iscsi_host_remove (struct Scsi_Host *shost,bool is_shutdown);
Bart Van Assche
maintainerPATCH v3 50/80 scsi: mac53c94: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/mac53c94.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mac53c94.c +1 -1
@@ -392,7 +392,7 @@ static void set_dma_cmds(struct fsc_state *state, struct scsi_cmnd *cmd)mac53c94_priv (cmd)->this_residual = total; } -static struct scsi_host_template mac53c94_template = { +static const struct scsi_host_template mac53c94_template = { .proc_name ="53c94" , .name ="53C94" , .queuecommand = mac53c94_queue,
Bart Van Assche
maintainerPATCH v3 51/80 scsi: megaraid: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/megaraid.c | 2 +- drivers/scsi/megaraid/megaraid_mbox.c | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/megaraid.c +1 -1
@@ -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" ,
drivers/scsi/megaraid/megaraid_mbox.c +1 -1
@@ -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" ,
drivers/scsi/megaraid/megaraid_sas_base.c +1 -1
@@ -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" ,
Bart Van Assche
maintainerPATCH v3 52/80 scsi: mesh: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/mesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mesh.c +1 -1
@@ -1830,7 +1830,7 @@ static int mesh_shutdown(struct macio_dev *mdev)return 0 ; } -static struct scsi_host_template mesh_template = { +static const struct scsi_host_template mesh_template = { .proc_name ="mesh" , .name ="MESH" , .queuecommand = mesh_queue,
Bart Van Assche
maintainerPATCH v3 53/80 scsi: mpi3mr: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mpi3mr/mpi3mr_os.c +1 -1
@@ -4795,7 +4795,7 @@ static int mpi3mr_qcmd(struct Scsi_Host *shost,return retval; } -static struct scsi_host_template mpi3mr_driver_template = { +static const struct scsi_host_template mpi3mr_driver_template = { .module =THIS_MODULE , .name ="MPI3 Storage Controller" , .proc_name =MPI3MR_DRIVER_NAME ,
Bart Van Assche
maintainerPATCH v3 54/80 scsi: mpt3sas: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_scsih.c +2 -2
@@ -11925,7 +11925,7 @@ static void scsih_map_queues(struct Scsi_Host *shost) }/* shost template for SAS 2.0 HBA devices */ -static struct scsi_host_template mpt2sas_driver_template = { +static const struct scsi_host_template mpt2sas_driver_template = { .module =THIS_MODULE , .name ="Fusion MPT SAS Host" , .proc_name =MPT2SAS_DRIVER_NAME ,
@@ -11963,7 +11963,7 @@ static struct raid_function_template mpt2sas_raid_functions = { };/* shost template for SAS 3.0 HBA devices */ -static struct scsi_host_template mpt3sas_driver_template = { +static const struct scsi_host_template mpt3sas_driver_template = { .module =THIS_MODULE , .name ="Fusion MPT SAS Host" , .proc_name =MPT3SAS_DRIVER_NAME ,
Bart Van Assche
maintainerPATCH v3 55/80 scsi: mvme147: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/mvme147.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mvme147.c +1 -1
@@ -69,7 +69,7 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, m147_pcc->dma_cntrl =0 ; } -static struct scsi_host_template mvme147_host_template = { +static const struct scsi_host_template mvme147_host_template = { .module =THIS_MODULE , .proc_name ="MVME147" , .name ="MVME147 built-in SCSI" ,
Bart Van Assche
maintainerPATCH v3 56/80 scsi: mvsas: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/mvsas/mv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mvsas/mv_init.c +1 -1
@@ -29,7 +29,7 @@ static const struct attribute_group *mvst_host_groups[];#define SOC_SAS_NUM 2 -static struct scsi_host_template mvs_sht = { +static const struct scsi_host_template mvs_sht = { .module =THIS_MODULE , .name =DRV_NAME , .queuecommand = sas_queuecommand,
Bart Van Assche
maintainerPATCH v3 57/80 scsi: mvumi: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/mvumi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mvumi.c +1 -1
@@ -2168,7 +2168,7 @@ mvumi_bios_param(struct scsi_device *sdev, struct block_device *bdev,return 0 ; } -static struct scsi_host_template mvumi_template = { +static const struct scsi_host_template mvumi_template = { .module =THIS_MODULE , .name ="Marvell Storage Controller" ,
Bart Van Assche
maintainerPATCH v3 58/80 scsi: myrb: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/myrb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/myrb.c +1 -1
@@ -2203,7 +2203,7 @@ static struct attribute *myrb_shost_attrs[] = {ATTRIBUTE_GROUPS (myrb_shost); -static struct scsi_host_template myrb_template = { +static const struct scsi_host_template myrb_template = { .module =THIS_MODULE , .name ="DAC960" , .proc_name ="myrb" ,
Bart Van Assche
maintainerPATCH v3 59/80 scsi: myrs: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/myrs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/myrs.c +1 -1
@@ -1915,7 +1915,7 @@ static void myrs_slave_destroy(struct scsi_device *sdev)kfree (sdev->hostdata); } -static struct scsi_host_template myrs_template = { +static const struct scsi_host_template myrs_template = { .module =THIS_MODULE , .name ="DAC960" , .proc_name ="myrs" ,
Bart Van Assche
maintainerPATCH v3 60/80 scsi: nsp32: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/nsp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/nsp32.c +1 -1
@@ -259,7 +259,7 @@ static void nsp32_dmessage(const char *, int, int, char *, ...);/* * max_sectors is currently limited up to 128. */ -static struct scsi_host_template nsp32_template = { +static const struct scsi_host_template nsp32_template = { .proc_name ="nsp32" , .name ="Workbit NinjaSCSI-32Bi/UDE" , .show_info = nsp32_show_info,
Bart Van Assche
maintainerPATCH v3 61/80 scsi: pcmcia-sym53c500: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/pcmcia/sym53c500_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/pcmcia/sym53c500_cs.c +2 -2
@@ -668,7 +668,7 @@ ATTRIBUTE_GROUPS(SYM53C500_shost);/* * scsi_host_template initializer */ -static struct scsi_host_template sym53c500_driver_template = { +static const struct scsi_host_template sym53c500_driver_template = { .module =THIS_MODULE , .name ="SYM53C500" , .info = SYM53C500_info,
@@ -702,7 +702,7 @@ SYM53C500_config(struct pcmcia_device *link)int ret;int irq_level, port_base;struct Scsi_Host *host; -struct scsi_host_template *tpnt = &sym53c500_driver_template; +const struct scsi_host_template *tpnt = &sym53c500_driver_template;struct sym53c500_data *data;dev_dbg (&link->dev,"SYM53C500_config\n" );
Bart Van Assche
maintainerPATCH v3 62/80 scsi: pcmcia-pm8001: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/pm8001/pm8001_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pm8001/pm8001_init.c +1 -1
@@ -96,7 +96,7 @@ static void pm8001_map_queues(struct Scsi_Host *shost)/* * The main structure which LLDD must register for scsi core. */ -static struct scsi_host_template pm8001_sht = { +static const struct scsi_host_template pm8001_sht = { .module =THIS_MODULE , .name =DRV_NAME , .proc_name =DRV_NAME ,
Bart Van Assche
maintainerPATCH v3 63/80 scsi: pmcraid: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/pmcraid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pmcraid.c +1 -1
@@ -3611,7 +3611,7 @@ static struct attribute *pmcraid_host_attrs[] = {ATTRIBUTE_GROUPS (pmcraid_host);/* host template structure for pmcraid driver */ -static struct scsi_host_template pmcraid_host_template = { +static const struct scsi_host_template pmcraid_host_template = { .module =THIS_MODULE , .name =PMCRAID_DRIVER_NAME , .queuecommand = pmcraid_queuecommand,
Bart Van Assche
maintainerPATCH v3 64/80 scsi: ppa: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/ppa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ppa.c +1 -1
@@ -972,7 +972,7 @@ static int ppa_adjust_queue(struct scsi_device *device)return 0 ; } -static struct scsi_host_template ppa_template = { +static const struct scsi_host_template ppa_template = { .module =THIS_MODULE , .proc_name ="ppa" , .show_info = ppa_show_info,
Bart Van Assche
maintainerPATCH v3 65/80 scsi: ps3rom: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/ps3rom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ps3rom.c +1 -1
@@ -323,7 +323,7 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data)return IRQ_HANDLED ; } -static struct scsi_host_template ps3rom_host_template = { +static const struct scsi_host_template ps3rom_host_template = { .name =DEVICE_NAME , .slave_configure = ps3rom_slave_configure, .queuecommand = ps3rom_queuecommand,
Bart Van Assche
maintainerPATCH v3 66/80 scsi: qla1280: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla1280.c +1 -1
@@ -4115,7 +4115,7 @@ qla1280_get_token(char *str) } -static struct scsi_host_template qla1280_driver_template = { +static const struct scsi_host_template qla1280_driver_template = { .module =THIS_MODULE , .proc_name ="qla1280" , .name ="Qlogic ISP 1280/12160" ,
Bart Van Assche
maintainerPATCH v3 67/80 scsi: qla2xxx: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_mid.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_gbl.h +1 -1
@@ -213,7 +213,7 @@ extern void qla2x00_free_exchoffld_buffer(struct qla_hw_data *);extern int qla81xx_restart_mpi_firmware (scsi_qla_host_t *); -extern struct scsi_qla_host *qla2x00_create_host (struct scsi_host_template *, +extern struct scsi_qla_host *qla2x00_create_host (const struct scsi_host_template *,struct qla_hw_data *);extern void qla2x00_free_host (struct scsi_qla_host *);extern void qla2x00_relogin (struct scsi_qla_host *);
drivers/scsi/qla2xxx/qla_mid.c +1 -1
@@ -496,7 +496,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)scsi_qla_host_t *base_vha =shost_priv (fc_vport->shost);struct qla_hw_data *ha = base_vha->hw;scsi_qla_host_t *vha; -struct scsi_host_template *sht = &qla2xxx_driver_template; +const struct scsi_host_template *sht = &qla2xxx_driver_template;struct Scsi_Host *host; vha =qla2x00_create_host (sht, ha);
drivers/scsi/qla2xxx/qla_os.c +2 -2
@@ -4999,8 +4999,8 @@ qla2x00_mem_free(struct qla_hw_data *ha) ha->vp_map =NULL ; } -struct scsi_qla_host *qla2x00_create_host (struct scsi_host_template *sht, -struct qla_hw_data *ha) +struct scsi_qla_host *qla2x00_create_host (const struct scsi_host_template *sht, +struct qla_hw_data *ha) {struct Scsi_Host *host;struct scsi_qla_host *vha =NULL ;
Bart Van Assche
maintainerPATCH v3 68/80 scsi: qlogicpti: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/qlogicpti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qlogicpti.c +1 -1
@@ -1287,7 +1287,7 @@ static int qlogicpti_reset(struct scsi_cmnd *Cmnd)return return_status; } -static struct scsi_host_template qpti_template = { +static const struct scsi_host_template qpti_template = { .module =THIS_MODULE , .name ="qlogicpti" , .info = qlogicpti_info,
Bart Van Assche
maintainerPATCH v3 69/80 scsi: sgiwd93: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/sgiwd93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sgiwd93.c +1 -1
@@ -204,7 +204,7 @@ static inline void init_hpc_chain(struct ip22_hostdata *hdata)* arguments not with pointers. So this is going to blow up beautyfully * on 64-bit systems with memory outside the compat address spaces. */ -static struct scsi_host_template sgiwd93_template = { +static const struct scsi_host_template sgiwd93_template = { .module =THIS_MODULE , .proc_name ="SGIWD93" , .name ="SGI WD93" ,
Bart Van Assche
maintainerPATCH v3 70/80 scsi: smartpqi: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/smartpqi/smartpqi_init.c +1 -1
@@ -7403,7 +7403,7 @@ static struct attribute *pqi_sdev_attrs[] = {ATTRIBUTE_GROUPS (pqi_sdev); -static struct scsi_host_template pqi_driver_template = { +static const struct scsi_host_template pqi_driver_template = { .module =THIS_MODULE , .name =DRIVER_NAME_SHORT , .proc_name =DRIVER_NAME_SHORT ,
Bart Van Assche
maintainerPATCH v3 71/80 scsi: snic: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/snic/snic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/snic/snic_main.c +1 -1
@@ -100,7 +100,7 @@ snic_change_queue_depth(struct scsi_device *sdev, int qdepth)return sdev->queue_depth; } -static struct scsi_host_template snic_host_template = { +static const struct scsi_host_template snic_host_template = { .module =THIS_MODULE , .name =SNIC_DRV_NAME , .queuecommand = snic_queuecommand,
Bart Van Assche
maintainerPATCH v3 72/80 scsi: stex: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/stex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/stex.c +1 -1
@@ -1472,7 +1472,7 @@ static int stex_biosparam(struct scsi_device *sdev,return 0 ; } -static struct scsi_host_template driver_template = { +static const struct scsi_host_template driver_template = { .module =THIS_MODULE , .name =DRV_NAME , .proc_name =DRV_NAME ,
Bart Van Assche
maintainerPATCH v3 73/80 scsi: sym53c8xx: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/sym53c8xx_2/sym_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/sym53c8xx_2/sym_glue.c +2 -2
@@ -1224,7 +1224,7 @@ static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev,* If all is OK, install interrupt handling and * start the timer daemon. */ -static struct Scsi_Host *sym_attach (struct scsi_host_template *tpnt,int unit, +static struct Scsi_Host *sym_attach (const struct scsi_host_template *tpnt,int unit,struct sym_device *dev) {struct sym_data *sym_data;
@@ -1625,7 +1625,7 @@ static int sym_detach(struct Scsi_Host *shost, struct pci_dev *pdev)/* * Driver host template. */ -static struct scsi_host_template sym2_template = { +static const struct scsi_host_template sym2_template = { .module =THIS_MODULE , .name ="sym53c8xx" , .info = sym53c8xx_info,
Bart Van Assche
maintainerPATCH v3 74/80 scsi: virtio-scsi: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/virtio_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/virtio_scsi.c +1 -1
@@ -746,7 +746,7 @@ static enum scsi_timeout_action virtscsi_eh_timed_out(struct scsi_cmnd *scmnd)return SCSI_EH_RESET_TIMER ; } -static struct scsi_host_template virtscsi_host_template = { +static const struct scsi_host_template virtscsi_host_template = { .module =THIS_MODULE , .name ="Virtio SCSI HBA" , .proc_name ="virtio_scsi" ,
Bart Van Assche
maintainerPATCH v3 75/80 scsi: wd719x: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/wd719x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/wd719x.c +1 -1
@@ -878,7 +878,7 @@ static int wd719x_board_found(struct Scsi_Host *sh)return ret; } -static struct scsi_host_template wd719x_template = { +static const struct scsi_host_template wd719x_template = { .module =THIS_MODULE , .name ="Western Digital 719x" , .cmd_size =sizeof (struct wd719x_scb ),
Bart Van Assche
maintainerPATCH v3 76/80 scsi: xen-scsifront: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/scsi/xen-scsifront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/xen-scsifront.c +1 -1
@@ -770,7 +770,7 @@ static void scsifront_sdev_destroy(struct scsi_device *sdev) } } -static struct scsi_host_template scsifront_sht = { +static const struct scsi_host_template scsifront_sht = { .module =THIS_MODULE , .name ="Xen SCSI frontend driver" , .queuecommand = scsifront_queuecommand,
Bart Van Assche
maintainerPATCH v3 77/80 scsi: rts5208: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/staging/rts5208/rtsx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rts5208/rtsx.c +1 -1
@@ -191,7 +191,7 @@ static int device_reset(struct scsi_cmnd *srb)* this defines our host template, with which we'll allocate hosts */ -static struct scsi_host_template rtsx_host_template = { +static const struct scsi_host_template rtsx_host_template = {/* basic userland interface stuff */ .name =CR_DRIVER_NAME , .proc_name =CR_DRIVER_NAME ,
Bart Van Assche
maintainerPATCH v3 78/80 scsi: target: tcm-loop: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/target/loopback/tcm_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/target/loopback/tcm_loop.c +1 -1
@@ -298,7 +298,7 @@ static int tcm_loop_target_reset(struct scsi_cmnd *sc)return FAILED ; } -static struct scsi_host_template tcm_loop_driver_template = { +static const struct scsi_host_template tcm_loop_driver_template = { .show_info = tcm_loop_show_info, .proc_name ="tcm_loopback" , .name ="TCM_Loopback" ,
Bart Van Assche
maintainerPATCH v3 79/80 scsi: ufs: Declare SCSI host template const
In reply to Bart Van AsscheMake it explicit that the SCSI host template is not modified.
--- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c +1 -1
@@ -8751,7 +8751,7 @@ static struct ufs_hba_variant_params ufs_hba_vps = { .ondemand_data.downdifferential = 5, }; -static struct scsi_host_template ufshcd_driver_template = { +static const struct scsi_host_template ufshcd_driver_template = { .module =THIS_MODULE , .name =UFSHCD , .proc_name =UFSHCD ,
Re: [PATCH v3 79/80] scsi: ufs: Declare SCSI host template const
Quoted 20 lines · Bart Van Assche
Make it explicit that the SCSI host template is not modified.
Signed-off-by Bart Van Assche <[email protected]>--- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ufs/core/ufshcd.c +1
-1@@ -8751,7 +8751,7 @@ static struct ufs_hba_variant_params ufs_hba_vps = { .ondemand_data.downdifferential = 5, }; -static struct scsi_host_template ufshcd_driver_template = { +static const struct scsi_host_template ufshcd_driver_template = { .module =THIS_MODULE , .name =UFSHCD ,
Quoted 1 line
.proc_name = UFSHCD,
Hi Bart,
This patch change scsi_host_templete to const.
If mediatek host want to modify deault rpm_autosuspend_delay timer, could you have any suggestions?
Thanks.
Peter
Bart Van Assche
maintainerRe: [PATCH v3 79/80] scsi: ufs: Declare SCSI host template const
Quoted 25 lines · Peter Wang (王信友)
Quoted 20 lines · Bart Van Assche
Make it explicit that the SCSI host template is not modified.
Signed-off-by Bart Van Assche <[email protected]>--- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ufs/core/ufshcd.c +1
-1@@ -8751,7 +8751,7 @@ static struct ufs_hba_variant_params ufs_hba_vps = { .ondemand_data.downdifferential = 5, }; -static struct scsi_host_template ufshcd_driver_template = { +static const struct scsi_host_template ufshcd_driver_template = { .module =THIS_MODULE , .name =UFSHCD ,Quoted 1 line
.proc_name = UFSHCD,
Hi Bart,
Quoted 3 lines
This patch change
scsi_host_templeteto const.
If mediatek host want to modify deaultrpm_autosuspend_delaytimer, could you have any suggestions?
Hi Peter,
Please add a new rpm_autosuspend_delay member to struct Scsi_Host and add code in scsi_host_alloc() for copying that member from the host template into struct Scsi_Host. An example is available in commit b125bb99559e.
Bart.
Re: [PATCH v3 79/80] scsi: ufs: Declare SCSI host template const
Quoted 9 lines
Quoted 6 lines
Hi Bart,
This patch change
scsi_host_templeteto const.
If mediatek host want to modify deaultrpm_autosuspend_delaytimer, could you have any suggestions?Hi Peter,
Quoted 7 lines
Please add a new
rpm_autosuspend_delaymember to structScsi_Hostand add code
inscsi_host_alloc()for copying that member from the host template into structScsi_Host. An example is available in commitb125bb99559e.Bart.
Hi Bart,
I add rpm_autosuspend_delay member to struct Scsi_Host and make it more simple to modify value, please have a review for it.
Thanks.
Peter
Bart Van Assche
maintainerPATCH v3 80/80 usb: uas: Declare two host templates and host template pointers const
In reply to Bart Van AsscheImprove source code documentation by constifying host templates that are not modified.
--- drivers/usb/image/microtek.c | 2 +- drivers/usb/storage/uas.c | 2 +- drivers/usb/storage/usb.c | 2 +- drivers/usb/storage/usb.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/usb/image/microtek.c +1 -1
@@ -620,7 +620,7 @@ static int mts_scsi_queuecommand_lck(struct scsi_cmnd *srb)static DEF_SCSI_QCMD (mts_scsi_queuecommand) -static struct scsi_host_template mts_scsi_host_template = { +static const struct scsi_host_template mts_scsi_host_template = { .module =THIS_MODULE , .name ="microtekX6" , .proc_name ="microtekX6" ,
drivers/usb/storage/uas.c +1 -1
@@ -894,7 +894,7 @@ static int uas_slave_configure(struct scsi_device *sdev)return 0 ; } -static struct scsi_host_template uas_host_template = { +static const struct scsi_host_template uas_host_template = { .module =THIS_MODULE , .name ="uas" , .queuecommand = uas_queuecommand,
drivers/usb/storage/usb.c +1 -1
@@ -937,7 +937,7 @@ int usb_stor_probe1(struct us_data **pus,struct usb_interface *intf, const struct usb_device_id *id, const struct us_unusual_dev *unusual_dev, - struct scsi_host_template *sht) + const struct scsi_host_template *sht) { struct Scsi_Host *host;struct us_data *us;
drivers/usb/storage/usb.h +1 -1
@@ -187,7 +187,7 @@ extern int usb_stor_probe1(struct us_data **pus,struct usb_interface *intf, const struct usb_device_id *id, const struct us_unusual_dev *unusual_dev, - struct scsi_host_template *sht); + const struct scsi_host_template *sht);extern int usb_stor_probe2 (struct us_data *us);extern void usb_stor_disconnect (struct usb_interface *intf);
Martin K. Petersen
AppliedBart,
Quoted 4 lines
It helps humans and the compiler if it is made explicit that SCSI host templates are not modified. Hence this patch series that constifies most SCSI host templates. Please consider this patch series for the next merge window.
Applied to 6.4/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · Bart Van Assche
It helps humans and the compiler if it is made explicit that SCSI host templates are not modified. Hence this patch series that constifies most SCSI host templates. Please consider this patch series for the next merge window.
Thanks,
[...]
Applied to 6.4/scsi-queue, thanks!
[01/80] scsi: qla2xxx: Refer directly to the qla2xxx_driver_template
https://git.kernel.org/mkp/scsi/c/a07be936d923 [02/80] scsi: core: Declare most SCSI host template pointers const https://git.kernel.org/mkp/scsi/c/31435de97466 [03/80] scsi: core: Declare SCSI host template pointer members const https://git.kernel.org/mkp/scsi/c/e0d3f2c694e5 [04/80] ata: Declare SCSI host templates const https://git.kernel.org/mkp/scsi/c/25df73d93323 [05/80] firewire: sbp2: Declare the SCSI host template const https://git.kernel.org/mkp/scsi/c/0ca31ecacfe5 [06/80] RDMA/srp: Declare the SCSI host template const https://git.kernel.org/mkp/scsi/c/4281af9d9f13 [07/80] scsi: message: fusion: Declare SCSI host template members const https://git.kernel.org/mkp/scsi/c/95a24cf170ed [08/80] scsi: zfcp: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/2887b7a8e07f [09/80] scsi: 3w-9xxx: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/682895797e56 [10/80] scsi: 3w-sas: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/e5be9953cb02 [11/80] scsi: 3w-xxxx: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/ca1b0e01f6b5 [12/80] scsi: BusLogic: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/83e479e12bfc [13/80] scsi: a100u2w: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/157fc774cc78 [14/80] scsi: a2091: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/4412df387040 [15/80] scsi: a3000: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/88530b3ea902 [16/80] scsi: aacraid: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/0cd7324b9e9d [17/80] scsi: advansys: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/8afc6e14a69b [18/80] scsi: aha152x: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/11e58ceacfab [19/80] scsi: aha1542: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/77168bd721bc [20/80] scsi: aic94xx: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/dbb26f2b4200 [21/80] scsi: arcmsr: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/34f5d2dc0038 [22/80] scsi: acornscsi: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/5d94e575a1f1 [23/80] scsi: arxescsi: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/116e5de74270 [24/80] scsi: aha1740: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/4df23b30fa23 [25/80] scsi: cumana: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/202423c58724 [26/80] scsi: eesox: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/13c2e9647198 [27/80] scsi: oak: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/644d8d77eee5 [28/80] scsi: powertec: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/9db801178eb8 [29/80] scsi: atp870u: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/f44e1c639ef0 [30/80] scsi: dc395x: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/16c0a2db0c4a [31/80] scsi: dmx3191d: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/b816c6bf69a7 [32/80] scsi: elx: efct: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/67791ce19f00 [33/80] scsi: esas2r: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/1f4e77dbcbad [34/80] scsi: esp_scsi: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/3b465a149146 [35/80] scsi: fcoe: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/d15515f91801 [36/80] scsi: fnic: Declare host template const https://git.kernel.org/mkp/scsi/c/bf3614bd7e8a [37/80] scsi: qedf: Declare host template const https://git.kernel.org/mkp/scsi/c/be8532d15342 [38/80] scsi: fdomain: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/8e6a87aa9162 [39/80] scsi: NCR5380: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/bd5e469a7f69 [40/80] scsi: gvp11: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/ccc54750f9b7 [41/80] scsi: hisi_sas: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/e8c0ced993dd [42/80] scsi: hpsa: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/207761bf1a8d [43/80] scsi: hptiop: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/9194970becd8 [44/80] scsi: ibmvfc: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/7bced3fc285a [45/80] scsi: imm: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/09dce26c4a89 [46/80] scsi: initio: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/4ba116af0fd3 [47/80] scsi: ipr: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/4ea4394e7120 [48/80] scsi: isci: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/eb60d17a0e4a [49/80] scsi: iscsi: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/80602aca4fcc [50/80] scsi: mac53c94: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/5e328664ed0b [51/80] scsi: megaraid: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/264e222b004c [52/80] scsi: mesh: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/0fabb7fbad55 [53/80] scsi: mpi3mr: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/b85f82f3c92a [54/80] scsi: mpt3sas: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/1785ced8bd4b [55/80] scsi: mvme147: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/c9ac4e73b373 [56/80] scsi: mvsas: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/f01feece6b64 [57/80] scsi: mvumi: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/8a098ba4d996 [58/80] scsi: myrb: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/8e64d59d1f1c [59/80] scsi: myrs: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/914fa37a8a54 [60/80] scsi: nsp32: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/36242912e24f [61/80] scsi: pcmcia-sym53c500: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/54aefe23a6c4 [62/80] scsi: pcmcia-pm8001: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/8fe69e4abdb5 [63/80] scsi: pmcraid: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/4e9e0a51aa31 [64/80] scsi: ppa: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/d23901a8d700 [65/80] scsi: ps3rom: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/4fe61364e7d1 [66/80] scsi: qla1280: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/796e8f808298 [67/80] scsi: qla2xxx: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/421c20b7668e [68/80] scsi: qlogicpti: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/7c7a1419179a [69/80] scsi: sgiwd93: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/4517353a048e [70/80] scsi: smartpqi: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/077126d6b941 [71/80] scsi: snic: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/8fb5b37e070e [72/80] scsi: stex: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/08d6075192d1 [73/80] scsi: sym53c8xx: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/d2c16f8f1ed2 [74/80] scsi: virtio-scsi: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/273ab251950f [75/80] scsi: wd719x: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/a5b78e81c712 [76/80] scsi: xen-scsifront: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/65e5447a1014 [77/80] scsi: rts5208: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/f8adf8e99a23 [78/80] scsi: target: tcm-loop: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/8e2ab8cda5aa [79/80] scsi: ufs: Declare SCSI host template const https://git.kernel.org/mkp/scsi/c/f2e2fe3dec7f [80/80] usb: uas: Declare two host templates and host template pointers const https://git.kernel.org/mkp/scsi/c/04d1fa4346cc
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering