Commit e8c0ced9 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: hisi_sas: Declare SCSI host template const



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

Acked-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-42-bvanassche@acm.org


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ccc54750
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -344,7 +344,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)
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -3216,7 +3216,7 @@ static void hisi_sas_map_queues(struct Scsi_Host *shost)
	blk_mq_pci_map_queues(qmap, hisi_hba->pci_dev, BASE_VECTORS_V3_HW);
}

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,