From patchwork Thu Mar 9 19:24:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5CB7C6FD19 for ; Thu, 9 Mar 2023 19:26:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbjCIT0Z (ORCPT ); Thu, 9 Mar 2023 14:26:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbjCIT0Y (ORCPT ); Thu, 9 Mar 2023 14:26:24 -0500 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83E6CE841C for ; Thu, 9 Mar 2023 11:26:23 -0800 (PST) Received: by mail-pg1-f182.google.com with SMTP id 16so1692492pge.11 for ; Thu, 09 Mar 2023 11:26:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678389983; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rTPeS6tBEMRDFCUaBbBw56D6tDM3vZchiMLIhTZmKIw=; b=vYwjPnGA68L4wW+U6lohD78xtsW4UwDxUEO0V69wi840UDVgZosmKjh52B+wt8qd2x IkN0yp/1VH9oQjrbRderSuNU2/4xYD7Tff41gXKtDjhtihz8AvaELbGaC16JKLmJbT+9 2FjQxYfTDtK7qKjMs0NolUV7OWgNTG53WH3fWJGKwedx6loLNoCYEhAUIKYJac22/f4n 8lvrNJRpFYbmM3hK0lfFvzArNfjhIy47rQKxFeX9/lG2REr7b5U01+28wx12uytMVF9l hvQ6uSXtlB2m1PcXNeR40q9M9aLUq5cuCpVHfo8RVn0jtmXxf08hwlm7SxcUSKFkfv+u TIvA== X-Gm-Message-State: AO0yUKW2DMIzDCgLF0/LNDSkgA65UfiuJf1E4cCuFh+Vdra1OfFPx1tw v8ndaKW2sKIeHBY0uHF39Fc= X-Google-Smtp-Source: AK7set90oEJRldaMAaC3iysy0h5ux6FJyOz4L543boa0qaHqEPd41gTERTHab0o3LIWmY6AGr4b6eg== X-Received: by 2002:a62:1a46:0:b0:598:b178:a3a9 with SMTP id a67-20020a621a46000000b00598b178a3a9mr18843988pfa.6.1678389982930; Thu, 09 Mar 2023 11:26:22 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:26:22 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Nilesh Javali , GR-QLogic-Storage-Upstream@marvell.com, "James E.J. Bottomley" Subject: [PATCH v2 01/82] scsi: qla2xxx: Refer directly to the qla2xxx_driver_template Date: Thu, 9 Mar 2023 11:24:53 -0800 Message-Id: <20230309192614.2240602-2-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Access the qla2xxx_driver_template data structure directly instead of via the host pointer. This patch prepares for declaring the 'hostt' pointer const. Cc: Nilesh Javali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index aa0cf5ca6c1c..5258b07687a9 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -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) { From patchwork Thu Mar 9 19:24:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661520 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BB19C61DA4 for ; Thu, 9 Mar 2023 19:26:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbjCIT0i (ORCPT ); Thu, 9 Mar 2023 14:26:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbjCIT0h (ORCPT ); Thu, 9 Mar 2023 14:26:37 -0500 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353D1E8CC0 for ; Thu, 9 Mar 2023 11:26:36 -0800 (PST) Received: by mail-pg1-f169.google.com with SMTP id d6so1722939pgu.2 for ; Thu, 09 Mar 2023 11:26:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678389995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jaQPCYCc9yDwURRG72Eunw93YA/7YzzjsEnNTaAlI4E=; b=KtaRGwuie3MY6yK9cpEtFkBuvSpsjhcZyUgY8ABNW8K3Ru3eWWsdFQRTxwGYW0xMTi tRGtwEtVXVREw8j5CZbBMwb5yKqmb2G9SbeW9sDiBvPkn6PB7cEeJP/E5jvVsi+IlZGY A4rscGUgzZCj4qbEgz2AnoibzExL5suctADzn/LXOCa6BPKqZQE7iYygobD4s32jAN7N xLbc8P3Vk6+cAc0aqQdqWmPcAh3/N/8vHNx6JSEDvfzYAYN76ewPUHpDNTsaWPRuXx1x /oycatVqQNYeGqSN9T4KXDzmb/MRSgajGT6A50TFExC4QRsWyXgWTm7NIg2oTJHQA/hS l9gg== X-Gm-Message-State: AO0yUKW8tTEy/2NM31bmCI16IPUPwrRQOjVDjfxYwh7xJd7Gfrlc9Dkb vYuwbSakZHoAXvej2QeC6BU= X-Google-Smtp-Source: AK7set+kqk0VqxGNXY/euDLNs/jjC5hNZy0qxB5gxFzgzVIdSbKVTpWdYM+4hBVFwYtFTVWTWMI7ag== X-Received: by 2002:a62:6143:0:b0:5ab:be1b:c75e with SMTP id v64-20020a626143000000b005abbe1bc75emr18983843pfb.24.1678389995660; Thu, 09 Mar 2023 11:26:35 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:26:34 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Benjamin Block , John Garry , Christoph Hellwig , Ming Lei , Hannes Reinecke , Mike Christie , "James E.J. Bottomley" Subject: [PATCH v2 03/82] scsi: core: Declare SCSI host template pointer members const Date: Thu, 9 Mar 2023 11:24:55 -0800 Message-Id: <20230309192614.2240602-4-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Declare the SCSI host template pointer members const and also the remaining SCSI host template pointers in the SCSI core. Reviewed-by: Benjamin Block Reviewed-by: John Garry Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Mike Christie Signed-off-by: Bart Van Assche --- drivers/scsi/hosts.c | 4 ++-- include/linux/raid_class.h | 2 +- include/scsi/libfc.h | 2 +- include/scsi/scsi_host.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index f7f62e56afca..0ac3289f6b09 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -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; diff --git a/include/linux/raid_class.h b/include/linux/raid_class.h index 5cdfcb873a8f..6a9b177d5c41 100644 --- a/include/linux/raid_class.h +++ b/include/linux/raid_class.h @@ -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 *); diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 6e29e1719db1..eca6fd42d7f7 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -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; diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 587cc767bb67..0f29799efa02 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -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 *); From patchwork Thu Mar 9 19:24:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661519 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09939C64EC4 for ; Thu, 9 Mar 2023 19:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229835AbjCIT1R (ORCPT ); Thu, 9 Mar 2023 14:27:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbjCIT1N (ORCPT ); Thu, 9 Mar 2023 14:27:13 -0500 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83B7EE9F3E for ; Thu, 9 Mar 2023 11:27:09 -0800 (PST) Received: by mail-pl1-f174.google.com with SMTP id x11so3080877pln.12 for ; Thu, 09 Mar 2023 11:27:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lX/7RHCIhDBowgMIbCzG1W+eKsEgKdKNWF2fe4kDcY4=; b=VHhdbQaD9y8eKze6KL9XLKcJcerwkgMJ6sMAU9oJwLo37Rz6q5mPuXjaUgyGuPeB1s +Kmo4rq9AkyQBNOF+TZ/drCHqfuC6hkxEbKM1TVk5mHSPpGQ23uPL16cIu2QFN2reSPW yirTwJht32VheMGC73CLQcPtbMp7641QDzW3z2ju4FoKM2vSDB5LRohCLUq1/ZH1yTL7 cSUqGcrEKdvAGAFKL8EyADHf4rD2Wc08yW0Nwd6TZGV4C5s4ng7Jr0Va2RyQLSbkuoLc ss6bE8aj+ODo/DfqGlr/TF+n/Q+MaE46BQpy1PRq23xWhiX6PR4voDSIK/tcwjHNML+i FP9g== X-Gm-Message-State: AO0yUKVBusKCAaUZnuUX3Jlm+8ztMgxn2ILohWm8RVjXVBbPkgH9dePH iOOm033COteGdFYyY5det7k= X-Google-Smtp-Source: AK7set9rGUo4Qr5I6B24w0mlBJPf1IbLiB/Xe9UVpZlMb3/jzXf2enoPxlCMPznoG5jntfILetyC/Q== X-Received: by 2002:a05:6a20:69a3:b0:c7:6f26:c99 with SMTP id t35-20020a056a2069a300b000c76f260c99mr37596304pzk.61.1678390028750; Thu, 09 Mar 2023 11:27:08 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:07 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Linus Walleij , Damien Le Moal , Christoph Hellwig , Ming Lei , Hannes Reinecke , John Garry , Mike Christie , Serge Semin , Shawn Guo , Sascha Hauer , Matthias Brugger , Hans de Goede , Jens Axboe , Patrice Chotard , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Jonathan Hunter , Viresh Kumar , Mikael Pettersson , Ondrej Zary , Sergey Shtylyov Subject: [PATCH v2 04/82] ata: Declare SCSI host templates const Date: Thu, 9 Mar 2023 11:24:56 -0800 Message-Id: <20230309192614.2240602-5-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that ATA host templates are not modified. Reviewed-by: Linus Walleij Acked-by: Damien Le Moal Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: John Garry Cc: Mike Christie Signed-off-by: Bart Van Assche Reviewed-by: Jon Hunter --- 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(-) diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index 993eadd173da..547f56341705 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c @@ -66,7 +66,7 @@ static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg static int acard_ahci_pci_device_resume(struct pci_dev *pdev); #endif -static struct scsi_host_template acard_ahci_sht = { +static const struct scsi_host_template acard_ahci_sht = { AHCI_SHT("acard-ahci"), }; diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 14a1c0d14916..addba109406b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -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"), }; diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index ff8e6ae1c636..4bae95b06ae3 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -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); diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c index 6f216eb25610..4e3dc2b6d67f 100644 --- a/drivers/ata/ahci_brcm.c +++ b/drivers/ata/ahci_brcm.c @@ -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), }; diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c index cb24ecf36faf..bc027468decb 100644 --- a/drivers/ata/ahci_ceva.c +++ b/drivers/ata/ahci_ceva.c @@ -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), }; diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c index dc8a019b8340..ca0924dc5bd2 100644 --- a/drivers/ata/ahci_da850.c +++ b/drivers/ata/ahci_da850.c @@ -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), }; diff --git a/drivers/ata/ahci_dm816.c b/drivers/ata/ahci_dm816.c index d26efcd20f64..b08547b877a1 100644 --- a/drivers/ata/ahci_dm816.c +++ b/drivers/ata/ahci_dm816.c @@ -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), }; diff --git a/drivers/ata/ahci_dwc.c b/drivers/ata/ahci_dwc.c index 8fb66860db31..4bfbb09cdc02 100644 --- a/drivers/ata/ahci_dwc.c +++ b/drivers/ata/ahci_dwc.c @@ -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), }; diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c index a950767f7948..1c1139dae29a 100644 --- a/drivers/ata/ahci_imx.c +++ b/drivers/ata/ahci_imx.c @@ -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), }; diff --git a/drivers/ata/ahci_mtk.c b/drivers/ata/ahci_mtk.c index c056378e3e72..f6a75341256f 100644 --- a/drivers/ata/ahci_mtk.c +++ b/drivers/ata/ahci_mtk.c @@ -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), }; diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c index 22ecc4f3ae79..596cf017f427 100644 --- a/drivers/ata/ahci_mvebu.c +++ b/drivers/ata/ahci_mvebu.c @@ -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), }; diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 8f5572a9f8f1..299ee686ac49 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -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), }; diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index 9cf9bf36a874..0ba764d283c8 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c @@ -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), }; diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c index ced12705ed9d..9eda7bbd2151 100644 --- a/drivers/ata/ahci_seattle.c +++ b/drivers/ata/ahci_seattle.c @@ -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), }; diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c index 8607b68eee53..f2c1edb36986 100644 --- a/drivers/ata/ahci_st.c +++ b/drivers/ata/ahci_st.c @@ -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), }; diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c index c7273c1cb0c7..076c12b4ba08 100644 --- a/drivers/ata/ahci_sunxi.c +++ b/drivers/ata/ahci_sunxi.c @@ -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), }; diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c index 4fb94db1217d..8e5e2b359f2d 100644 --- a/drivers/ata/ahci_tegra.c +++ b/drivers/ata/ahci_tegra.c @@ -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), }; diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c index 1e08704d5117..83f5ff54ef5b 100644 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c @@ -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), }; diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c index 20a32e4d501d..2f57ec00ab82 100644 --- a/drivers/ata/ata_generic.c +++ b/drivers/ata/ata_generic.c @@ -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), }; diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index ade5e894563b..ec3c5bd1f813 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -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; diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 8f216de76648..9c2cb6cbea76 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -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; diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c index b9e336bacf17..d6c3a6ffb0b3 100644 --- a/drivers/ata/libahci_platform.c +++ b/drivers/ata/libahci_platform.c @@ -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; diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 14c17c3bda4e..8bf612bdd61a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -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; diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index e093c7a7deeb..7bb12deab70c 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -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; diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index cd82d3b5ed14..9d28badfe41d 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c @@ -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); diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 2cd6124a01e8..926d0d33cd29 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -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); diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index f8706ee427d2..ab38871b5e00 100644 --- a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c @@ -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), }; diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 76ad0e73fe2a..bb790edd6036 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c @@ -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), }; diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index f216f9d7b9ec..5b02b89748b7 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -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), }; diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index e89617ed9175..6ab294322e79 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c @@ -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, }; diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index 20a8f31a3f57..40544282f455 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c @@ -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), }; diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index efdb94cff68b..8c5cc803aab3 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c @@ -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, diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c index 779d660415c8..aaef5924f636 100644 --- a/drivers/ata/pata_atp867x.c +++ b/drivers/ata/pata_atp867x.c @@ -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), }; diff --git a/drivers/ata/pata_buddha.c b/drivers/ata/pata_buddha.c index 27d4c417fc60..49bc619b83e2 100644 --- a/drivers/ata/pata_buddha.c +++ b/drivers/ata/pata_buddha.c @@ -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), }; diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index 1a3372a72213..45a7217b136e 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c @@ -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), }; diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 5baa4a7819c1..fafea2b79145 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c @@ -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), }; diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index f4289a532f87..422d42761a1d 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c @@ -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, diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c index d5b7ac14e78f..1e67b0f8db43 100644 --- a/drivers/ata/pata_cs5530.c +++ b/drivers/ata/pata_cs5530.c @@ -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, diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index c2c3238ff84b..d793fc441b46 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c @@ -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), }; diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index ab47aeb5587f..b811efd2cc34 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c @@ -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), }; diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c index 3be5d52a777b..ae347b5c2871 100644 --- a/drivers/ata/pata_cypress.c +++ b/drivers/ata/pata_cypress.c @@ -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), }; diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index 21da59f35b41..2e6eccf2902f 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c @@ -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), }; diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 47845d920075..c6e043e05d43 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -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, diff --git a/drivers/ata/pata_falcon.c b/drivers/ata/pata_falcon.c index 823c88622e34..996516e64f13 100644 --- a/drivers/ata/pata_falcon.c +++ b/drivers/ata/pata_falcon.c @@ -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), }; diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c index 88924b5daa1a..6f6734c09b11 100644 --- a/drivers/ata/pata_ftide010.c +++ b/drivers/ata/pata_ftide010.c @@ -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), }; diff --git a/drivers/ata/pata_gayle.c b/drivers/ata/pata_gayle.c index 65bc9f3042ce..e5aa07f92106 100644 --- a/drivers/ata/pata_gayle.c +++ b/drivers/ata/pata_gayle.c @@ -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), }; diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index 7e441fb304d3..bdccd1ba1524 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c @@ -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), }; diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index ce3c5eaa7e76..c0329cf01135 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c @@ -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), }; diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c index 617c95522f43..5b1ecccf3c83 100644 --- a/drivers/ata/pata_hpt3x2n.c +++ b/drivers/ata/pata_hpt3x2n.c @@ -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), }; diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c index 83974d5eb387..d65c586b5ad0 100644 --- a/drivers/ata/pata_hpt3x3.c +++ b/drivers/ata/pata_hpt3x3.c @@ -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), }; diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index 498383cb6e29..9cfb064782c3 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c @@ -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, diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c index 150939275b1b..4013f28679a9 100644 --- a/drivers/ata/pata_imx.c +++ b/drivers/ata/pata_imx.c @@ -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), }; diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c index 43bb224430d3..25a63d043c8e 100644 --- a/drivers/ata/pata_isapnp.c +++ b/drivers/ata/pata_isapnp.c @@ -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), }; diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index 8a3e8778163c..b7ac56103c8a 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -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), }; diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 8a5b4e0079ab..2fe3fb6102ce 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c @@ -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), }; diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c index e225913a619d..9a2c1b6cd71f 100644 --- a/drivers/ata/pata_ixp4xx_cf.c +++ b/drivers/ata/pata_ixp4xx_cf.c @@ -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), }; diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index d1b3ce8958dd..f51fb8219762 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c @@ -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), }; diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c index 03c580625c2c..448a511cbc17 100644 --- a/drivers/ata/pata_legacy.c +++ b/drivers/ata/pata_legacy.c @@ -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), }; diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index 9ccaac9e2bc3..c4d86ea049f0 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c @@ -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 */ diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 014ccb0f45dc..8119caaad605 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c @@ -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), }; diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index 3ebd6522a1fd..66c9dea4ea6e 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c @@ -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), }; diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index 8fda0e32c1ab..69e4baf27d72 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c @@ -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), }; diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c index 06929e77c491..c0b2897fcf40 100644 --- a/drivers/ata/pata_netcell.c +++ b/drivers/ata/pata_netcell.c @@ -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), }; diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c index f9255d6fd194..76a91013d27d 100644 --- a/drivers/ata/pata_ninja32.c +++ b/drivers/ata/pata_ninja32.c @@ -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), }; diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c index ca3ab2736fef..44cc24d21d5f 100644 --- a/drivers/ata/pata_ns87410.c +++ b/drivers/ata/pata_ns87410.c @@ -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), }; diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index 9dd6bffefb48..d60e1f69d7b0 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c @@ -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), }; diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index 4cbcdc5da038..b1ce9f1761af 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c @@ -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), }; diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index ac5a633c00a5..178b28eff170 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c @@ -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), }; diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c index 22a020374410..dca82d92b004 100644 --- a/drivers/ata/pata_oldpiix.c +++ b/drivers/ata/pata_oldpiix.c @@ -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), }; diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c index 01976c4e4033..3d23f57eb128 100644 --- a/drivers/ata/pata_opti.c +++ b/drivers/ata/pata_opti.c @@ -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), }; diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c index ad1090b90e52..dfc36b4ec9c6 100644 --- a/drivers/ata/pata_optidma.c +++ b/drivers/ata/pata_optidma.c @@ -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), }; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 294a266a0dda..02a62310845a 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -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") }; diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index 8eb066abbd9c..5b602206c522 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c @@ -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), }; diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 4191aa61c8e4..6820c5597b14 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c @@ -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), }; diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index f894ff2de0a9..a32723e46357 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c @@ -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), }; diff --git a/drivers/ata/pata_piccolo.c b/drivers/ata/pata_piccolo.c index 389b63b13c70..ced906bf56be 100644 --- a/drivers/ata/pata_piccolo.c +++ b/drivers/ata/pata_piccolo.c @@ -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), }; diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index 21fb059859bd..87479bc893b2 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c @@ -45,7 +45,7 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu return 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; diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c index 985f42c4fd70..ea402e02c46e 100644 --- a/drivers/ata/pata_pxa.c +++ b/drivers/ata/pata_pxa.c @@ -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), }; diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index 3aca8fe3fdb6..84b001097093 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c @@ -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), }; diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 2e110aefe59b..3974d294a341 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c @@ -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), }; diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c index ecb229c2c1a2..0a9689862f71 100644 --- a/drivers/ata/pata_rdc.c +++ b/drivers/ata/pata_rdc.c @@ -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), }; diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index fb00c3e5fd19..8e2606793091 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c @@ -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), }; diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index f28daf62a37d..a388dfb97ad8 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c @@ -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, diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c index 4f9c2aefd807..8356f1f2a025 100644 --- a/drivers/ata/pata_sch.c +++ b/drivers/ata/pata_sch.c @@ -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), }; diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c index c0bc4af0d196..549ff24a9823 100644 --- a/drivers/ata/pata_serverworks.c +++ b/drivers/ata/pata_serverworks.c @@ -252,13 +252,13 @@ static void serverworks_set_dmamode(struct ata_port *ap, struct ata_device *adev pci_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); diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 67ef2e26d7df..abe64b5f83cf 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c @@ -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), }; diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 92e4cf05de2c..31de06b66221 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c @@ -539,7 +539,7 @@ static unsigned int sis_133_mode_filter(struct ata_device *adev, unsigned int ma return mask; } -static struct scsi_host_template sis_sht = { +static const struct scsi_host_template sis_sht = { ATA_BMDMA_SHT(DRV_NAME), }; diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index 8487470e2e01..3b62ea482f1a 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c @@ -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), }; diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index 782162d2f3f8..26d448a869e2 100644 --- a/drivers/ata/pata_triflex.c +++ b/drivers/ata/pata_triflex.c @@ -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), }; diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 34f00f389932..696b99720dcb 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -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), }; diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 35b823ac20c9..8e6b2599f0d5 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c @@ -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, diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 21d77633a98f..24334a8a3f0b 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -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 diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index b052c5a65c17..ccd99b9aa9ff 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -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, diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c index dfbf9493e451..8237ece4a46f 100644 --- a/drivers/ata/sata_highbank.c +++ b/drivers/ata/sata_highbank.c @@ -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"), }; diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c index 2833c722118d..2c8c78ed86c1 100644 --- a/drivers/ata/sata_inic162x.c +++ b/drivers/ata/sata_inic162x.c @@ -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? */ diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index e3cff01201b8..d404e631d152 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -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, diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 9b2d289e89e1..abf5651c87ab 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -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) \ diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index 4e60e6c4c35a..2df1a070b25a 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c @@ -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, diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index 8ca0810aad26..8a6286159044 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c @@ -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, diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 0195eb29f6c2..34790f15c1b8 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -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 diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 3b989a52879d..cc77c0248284 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c @@ -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, diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 22cc9e9789dd..e72a0257990d 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c @@ -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, diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 316237362aa9..ef8724986de3 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c @@ -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), }; diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index 2e3418a82b44..c47c3fb434d5 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c @@ -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, }; diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index a92c60455b1d..ccc016072637 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c @@ -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, diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c index 815e6af75310..60ea45926cd1 100644 --- a/drivers/ata/sata_uli.c +++ b/drivers/ata/sata_uli.c @@ -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), }; diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index c7891cc84ea0..57cbf2cef618 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c @@ -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), }; diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c index 87e4ed66b306..d39b87537168 100644 --- a/drivers/ata/sata_vsc.c +++ b/drivers/ata/sata_vsc.c @@ -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), }; diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h index 17fa26215292..fe0760ce34c8 100644 --- a/include/linux/ahci_platform.h +++ b/include/linux/ahci_platform.h @@ -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); diff --git a/include/linux/ata_platform.h b/include/linux/ata_platform.h index 9cafec92282d..b9745cc08e38 100644 --- a/include/linux/ata_platform.h +++ b/include/linux/ata_platform.h @@ -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); /* diff --git a/include/linux/libata.h b/include/linux/libata.h index a759dfbdcc91..311cd93377c7 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -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 */ From patchwork Thu Mar 9 19:24:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661518 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50341C64EC4 for ; Thu, 9 Mar 2023 19:27:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229887AbjCIT11 (ORCPT ); Thu, 9 Mar 2023 14:27:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbjCIT1S (ORCPT ); Thu, 9 Mar 2023 14:27:18 -0500 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AEDEEB89F for ; Thu, 9 Mar 2023 11:27:15 -0800 (PST) Received: by mail-pl1-f182.google.com with SMTP id p6so3162266plf.0 for ; Thu, 09 Mar 2023 11:27:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390035; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qFxngvs+9YQWf/cm0pKR7KdAZBfNtlH0C+J3zrjYTbg=; b=Uj/kzSbPh26++vDSlhauYL9M87eF1S4Y/T15KqqGN6zz2S8B8NMf+F8pgpTCXeUbCh floUeNhCFpkHj28FZTxqbEmI2yM1ING+0IBMBgwhBCxLEFnwh5kmWp4U7RSn6/1NH7wg TG18CPgfGWScXIEBx4F4LXyWSlmC9kJ27U6lMPXYlaUekGe2wqs7S6mAbd1CjlUn9y47 V0RbqlUWHGgacNr3rRxf/nq8ryJMBHvMxX3l/zl9q3phaTi2Ttku4QuQS+n0qOkcpPW5 rfWEwjbkn1ZR7S5m+4+LMtvwk0u9P78TwqzeVAgHlbL7prgX/n2NzyXVPHn2H5DMZBG8 vXeA== X-Gm-Message-State: AO0yUKXo1A6lc66QR2yknNBok0kRsGGBHLnVfLnTmUJIDzwxLThay98/ p9EUMfcyLI8V3SHlgzZDamQ= X-Google-Smtp-Source: AK7set90QUNEThpyucUD+awcI/bnRevmucRCPnCnYGmnMNNkHjvLtFaKpcyoZJWo0V1PNetCT6400w== X-Received: by 2002:a05:6a20:729f:b0:cc:4058:82bd with SMTP id o31-20020a056a20729f00b000cc405882bdmr26837291pzk.13.1678390034866; Thu, 09 Mar 2023 11:27:14 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:14 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani Subject: [PATCH v2 07/82] scsi: message: fusion: Declare SCSI host template members const Date: Thu, 9 Mar 2023 11:24:59 -0800 Message-Id: <20230309192614.2240602-8-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host templates are not modified. Signed-off-by: Bart Van Assche --- 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(-) diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index fac747109209..22e7779a332b 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -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, diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 88fe4a860ae5..86f16f3ea478 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -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, diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 62089a8caa2f..6c5920db1e9d 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -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, From patchwork Thu Mar 9 19:25:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661516 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA358C742A7 for ; Thu, 9 Mar 2023 19:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230128AbjCIT1f (ORCPT ); Thu, 9 Mar 2023 14:27:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjCIT1W (ORCPT ); Thu, 9 Mar 2023 14:27:22 -0500 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47CF4EABA2 for ; Thu, 9 Mar 2023 11:27:21 -0800 (PST) Received: by mail-pl1-f175.google.com with SMTP id i3so3105425plg.6 for ; Thu, 09 Mar 2023 11:27:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390041; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wlyhrjS/HEDGCdAm7rlCI5/1sqj4pYqwf5Yq1hTnrno=; b=DWUgwqvz4DdJ2lZeGNy0CLlyFYYsOtZwqM4UXuSdNh9ndH2Ghgwc3UNzJHvOa1CY5X kHUcFQToz71HkrV2YlpDZXY8fzlLLV8idXV580ogHV8X9DSXZZ/1gFkdFk5lk51lZaVJ HIsoYGFJiszGuy7GZ5UKsR2K5WnXxfYOE55trFrfJHVlzYaXBkuQ+uoHSGlDiBB/92Jd jVPPwGvptzoDHwjDI1VQ+zY5EiL8CR8h+H7OJ1++K05dPSMotDgPyO7Vo/t4MfX5ji6J 6wRhDLCDf2eKneJxtLY6P392SpPNVpJyBnVZlcJv/DQov8fXJvifJrC4p9xrCZqp2OpM /1Yg== X-Gm-Message-State: AO0yUKXe+n9SqGs01p6qWITl0roRqUkfW/CaPR15RDMGh+DfDhOTvzl+ WuzbJvlP6VLiZuRGCBAj7lo= X-Google-Smtp-Source: AK7set/b6/sqd2eE/gjU8cJm1xQUM3yOTMDP+YlWMtwkWWtlPw1ZhTdyQuRubbD5cCDGBd00jl9SDQ== X-Received: by 2002:a05:6a20:4c92:b0:cd:42cf:6e03 with SMTP id fq18-20020a056a204c9200b000cd42cf6e03mr3114429pzb.26.1678390040778; Thu, 09 Mar 2023 11:27:20 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:20 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Adam Radford , "James E.J. Bottomley" Subject: [PATCH v2 10/82] scsi: 3w-sas: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:02 -0800 Message-Id: <20230309192614.2240602-11-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/3w-sas.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index f41c93454f0c..55989eaa2d9f 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c @@ -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, From patchwork Thu Mar 9 19:25:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661517 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAC48C6FD19 for ; Thu, 9 Mar 2023 19:27:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbjCIT1e (ORCPT ); Thu, 9 Mar 2023 14:27:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbjCIT11 (ORCPT ); Thu, 9 Mar 2023 14:27:27 -0500 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28A7FEBDAE for ; Thu, 9 Mar 2023 11:27:23 -0800 (PST) Received: by mail-pl1-f181.google.com with SMTP id u5so3098653plq.7 for ; Thu, 09 Mar 2023 11:27:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NNIBPT74zB8cP9y9PhKNlxYuRy1lcz2hltLytVbDwLc=; b=eUc1XlMcIss9dl4QOcJOUZ7/eBF9xX+LA44drUxHPKkSaheOjs5FEA0oQNP5S3Jt4x qJUYBofbr+EUCQ4hdBks2eerrweTTTaxVweNR35+dWaP8MOVFnxTzO9zzCyAeFXUJbF+ yFfVXxYlSSCcwSjen1zQxErE7uji/buQQRo/Kqxd+LC3Kuw4f9+5Q6kg+blfGaX1uKKa lY3pz4d7jSsjMizh+NvVDzugyJRFvg1NKG3JgTlIzgKhlvnfUwkKmztVxf2C8S4mw/uZ jN4WpzzsnfA7cvviYFvDe6mFzlp9XhXuJSlo67yGDd/1aLDw4YWkkzUsKyIpxUc/Z/Sl ZOJw== X-Gm-Message-State: AO0yUKXkPcJM7hSHI2QghMJ5e9xJ/HPb6lXe+Uhx4E6+lEFyhqZdqQ27 kA0vN5HLHADrMNZuSmB2ESA= X-Google-Smtp-Source: AK7set/4EBK77RaqA0kJOEgA9XfHVTBVHTWFdLr8WU1QIvsfTzxKhaZ2TlEwxcqKq45w9EN/5ABddg== X-Received: by 2002:a05:6a20:1b28:b0:cd:478b:a9c9 with SMTP id ch40-20020a056a201b2800b000cd478ba9c9mr20234896pzb.6.1678390042552; Thu, 09 Mar 2023 11:27:22 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:21 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Adam Radford , "James E.J. Bottomley" Subject: [PATCH v2 11/82] scsi: 3w-xxxx: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:03 -0800 Message-Id: <20230309192614.2240602-12-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/3w-xxxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index ffdecb12d654..36c34ced0cc1 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -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, From patchwork Thu Mar 9 19:25:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB6CBC6FD19 for ; Thu, 9 Mar 2023 19:27:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjCIT1i (ORCPT ); Thu, 9 Mar 2023 14:27:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbjCIT11 (ORCPT ); Thu, 9 Mar 2023 14:27:27 -0500 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A778EE293 for ; Thu, 9 Mar 2023 11:27:25 -0800 (PST) Received: by mail-pg1-f180.google.com with SMTP id q189so1705089pga.9 for ; Thu, 09 Mar 2023 11:27:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wvru8kVY2I3MSun55wPTjy7EC406KfhAV63CSzUeJMc=; b=Y7xOv2fxWTbbv97BjyArrYpK3r9XGpw9QabHL0BSmnypkLX9MaLaFo+4d7vbDzT1V5 5pR/mjSQCOdzOn1D70ssThgYHHqol80P5XEbYo2j5Or/b8+hdLTbzUrZdnLEraXr4uNf KRF0qoRBYu5mw4DuEw5wa6DJrmM4WO8r/bYw++Eal60L5eaPXriagWKDT1GtmWdskv3r oMs50gyLFug+2J8Ki+uqF5S65qhuCHfceX+3VgPtBR84XxB+vO7tNnmBHz2kiPlPnfFn oWJaBr8Ehuqf3DbaFKoz85l26LPl8sIz1LJXSh0+/t0+6OOkaqb7MdLgMVKDFH4GSa70 JYjQ== X-Gm-Message-State: AO0yUKXnT3LbvArOrxDxHi6qF8RywVBX3doYksSzolixaRIAeiavPAbh 02JlQ4beAlU/slvvTuPklqc= X-Google-Smtp-Source: AK7set96jNrlLocDv2+vzdLKJ2Px0Pzxz2BgBEbmhaQydywEWWc5aGppOLSzE50MbzxeaOEYmlai3A== X-Received: by 2002:a62:17d0:0:b0:5e2:da34:4aad with SMTP id 199-20020a6217d0000000b005e2da344aadmr19835630pfx.27.1678390044701; Thu, 09 Mar 2023 11:27:24 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:23 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Khalid Aziz , "James E.J. Bottomley" Subject: [PATCH v2 12/82] scsi: BusLogic: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:04 -0800 Message-Id: <20230309192614.2240602-13-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Acked-by: Khalid Aziz Signed-off-by: Bart Van Assche --- drivers/scsi/BusLogic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index f7b7ffda1161..72ceaf650b0d 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -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, From patchwork Thu Mar 9 19:25:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EC96C742A7 for ; Thu, 9 Mar 2023 19:27:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbjCIT1l (ORCPT ); Thu, 9 Mar 2023 14:27:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbjCIT1c (ORCPT ); Thu, 9 Mar 2023 14:27:32 -0500 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBF8DF05D6 for ; Thu, 9 Mar 2023 11:27:28 -0800 (PST) Received: by mail-pf1-f176.google.com with SMTP id ce7so2182415pfb.9 for ; Thu, 09 Mar 2023 11:27:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390048; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xOqT7dLP4YcCtL1jZVtGdq9lau6Z+QsWChHpf/+Jq3I=; b=cN+vNmIX3weG+GazLlnQ8RH8ywwRPRk+/02/xdYrDupPyNBBOyX/hFkCEQj8ok65mj vcoozwEC8qz91jSq744E5cHtyMSzHHYgOQDeqhAlVVPu/mATe00+5MIvZfCJcrPmGFOS mCaydMoxKKCm0gT2Z/aX/sQTlASBRAFRxPXbcBvAjGa1fOwHRGH/4z1yOca9NZ6qffpR n+9rAMGOreSWRSt7640h9xNU9Gmr2Jg8Wuw/bXDquTr011qPpRiwsprRINTjxCmW5ItH Pcg9/k3yHbAjKb6KEvGHMWgVsCE7xagJRlzSGrPMSntauvGdMvsbWMIGNXR9dmyY0BhT Bjmg== X-Gm-Message-State: AO0yUKVrGrcetaZWJ37jp7CiXSa0yI7xJPZfRVj92ZyXmWNGU/gb2nre R5BX/ojPSkp9acB9xy/f9nrwKgQSI7rW8g== X-Google-Smtp-Source: AK7set/CAK7D0cDxsb32XNQlNubig5a004u0QukLn487pOUItJCTsvh9WKcqNhS1Ps346vNiJUoL6w== X-Received: by 2002:aa7:9d84:0:b0:5a8:b958:e348 with SMTP id f4-20020aa79d84000000b005a8b958e348mr17145241pfq.28.1678390048301; Thu, 09 Mar 2023 11:27:28 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:27 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 14/82] scsi: a2091: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:06 -0800 Message-Id: <20230309192614.2240602-15-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/a2091.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c index 74312400468b..204448bfd04b 100644 --- a/drivers/scsi/a2091.c +++ b/drivers/scsi/a2091.c @@ -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, From patchwork Thu Mar 9 19:25:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CD9DC61DA4 for ; Thu, 9 Mar 2023 19:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbjCIT1w (ORCPT ); Thu, 9 Mar 2023 14:27:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbjCIT1f (ORCPT ); Thu, 9 Mar 2023 14:27:35 -0500 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1ECCEB89F for ; Thu, 9 Mar 2023 11:27:33 -0800 (PST) Received: by mail-pg1-f170.google.com with SMTP id 16so1694276pge.11 for ; Thu, 09 Mar 2023 11:27:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390053; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0DwKfQtFgIgqVRLk7CJqp+SWpc3PgTs6DS8lVIZ4b8Q=; b=1/hWrUJdrSr46ltkMffGdMcDtFcDDnmDLaCGMEjBbRViun9w/rQhPx4qDIMrmxVmXT pXZ5pKDloD/yr4Sg0NRRalDcis7cCS6Rc4zOBwgBjNGkZAn0HXYnBAVAWdOEkeA44u9G lEcdwDMfa1j0v17D75fZLji7TlmZzZdANhjQDJzt2gd0GTC/peQ9auxuc6Q0iLvK3ysV xqbK5J1itZM3re5N4xWLMrrvN7+LqG6W/cGnChTbBHKz6JXedDQ07cT78qLFJ8/iYxDo YbThfaxam1+382tppQufIMlfdj4U382F8l1v6THy9H6gmCo249KAbwwTaI44BefwWNrN 704A== X-Gm-Message-State: AO0yUKXnmx/ObLC9YAhfU8ME98dyb9leRpgu0H+JWTpQRS0Ye3P5/YlC uyq4qzxNFZ1iWpskr5ip01M= X-Google-Smtp-Source: AK7set/y3YnCnvQDHbggNrQ2hXVo1IUnNJAaG/Ngq585Cesql1017hNlrUhot/W1EwTnTFFJ+J26Zw== X-Received: by 2002:aa7:96f9:0:b0:593:2289:f01c with SMTP id i25-20020aa796f9000000b005932289f01cmr16747182pfq.25.1678390053413; Thu, 09 Mar 2023 11:27:33 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:32 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Matthew Wilcox , Hannes Reinecke , "James E.J. Bottomley" Subject: [PATCH v2 17/82] scsi: advansys: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:09 -0800 Message-Id: <20230309192614.2240602-18-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/advansys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index f301aec044bb..ab066bb27a57 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -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, From patchwork Thu Mar 9 19:25:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8D5DC64EC4 for ; Thu, 9 Mar 2023 19:27:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbjCIT1z (ORCPT ); Thu, 9 Mar 2023 14:27:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230161AbjCIT1m (ORCPT ); Thu, 9 Mar 2023 14:27:42 -0500 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69FC8EBAD8 for ; Thu, 9 Mar 2023 11:27:37 -0800 (PST) Received: by mail-pg1-f176.google.com with SMTP id 132so1693928pgh.13 for ; Thu, 09 Mar 2023 11:27:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390057; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NCdcj3LpvEBy9di6orhMZ8/sN2tsh1WV92aSckv+nIs=; b=jvan02aD4MyIkUVOWzlYiUuE/mTbB9YsfHivqYSQu1VlavL+4cqYWkqlGQOnCBhPum 4zpciIExMMEYiqZfiXKCpt4p0kLzunAZDfe4dpL6O4k2WGEvncfGQbM2MOCl4KpsHfkN CATatahGPz93yU1mCalm6P4dXjafUwbJM9Z9ZwTH0kGWzp8kFHb/1khLPmncsT2ppDNZ 8PorT3ilv2XbQUCkBj5oEjqWUEIA6IPfel1DLz4/PLDlOpa0t5p9yki0/zRbY35lfHhK 4m5YHBnMvUvv4q/SFMgSU14XM46HdFO7Iui1R5WXYfakxBe+Aa8uZfhjYDlfEGEWqL1F e14g== X-Gm-Message-State: AO0yUKVe6G7sVgEfZ+ScFOVIazHeQm08A9TripO3L5K0zywj2qisyCp8 8hlxaq2P/mQXeoVdu/XWNu4= X-Google-Smtp-Source: AK7set+olxdamLeR/yluzvoeFHuR37FaMQX6IdIyS+UNDSvRaFvqd9mV/dil42K3sThylZ8rZ8aW5g== X-Received: by 2002:a62:3182:0:b0:617:bce6:f033 with SMTP id x124-20020a623182000000b00617bce6f033mr14088855pfx.14.1678390056849; Thu, 09 Mar 2023 11:27:36 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:36 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 19/82] scsi: aha1542: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:11 -0800 Message-Id: <20230309192614.2240602-20-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/aha1542.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 552ca95157da..9503996c6325 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c @@ -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", From patchwork Thu Mar 9 19:25:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661510 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 447CEC64EC4 for ; Thu, 9 Mar 2023 19:28:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbjCIT2Q (ORCPT ); Thu, 9 Mar 2023 14:28:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230427AbjCIT2E (ORCPT ); Thu, 9 Mar 2023 14:28:04 -0500 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37C440C9 for ; Thu, 9 Mar 2023 11:27:55 -0800 (PST) Received: by mail-pj1-f49.google.com with SMTP id x20-20020a17090a8a9400b00233ba727724so6320853pjn.1 for ; Thu, 09 Mar 2023 11:27:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390075; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eGAtFpoWpz/OcncKuNsqhXl/J3Y5AN3EUnYkklVU1uo=; b=Z9kVsi17Ldq+a1cInQ9ytD8AP16Fvh+bSBuOZQmHTUEltL7AnS83r395QExcWVv24S n7NYioxmFsANCnimKoA5ABgO17XJskE7H3tP9twtOoCV3YlWMPwUU+q2X+hX0ESNAR0x bbdoD7PR2b9KKs9p31VH+tkcWKM3dStNo76hWUZJ0HVePyd+HPt83tx5g9O4oamul0/p tT52s5EWFb6sc9mTbuDplhQbXczcr97VJopQm5uDxMaflTW0jADGYpTJ1MbLOyCI/7rF XP29vNwMwKjFVbCICGimgniXG9IoflRMId7e8A+zfFs7NmDNTDNzOwR0yQWtY0ezW+xp yK7g== X-Gm-Message-State: AO0yUKX9p6zNJ+q1xlASSwhoibrWY5Qp5cSDjMURRcnff8P7f6ls+Gw4 s0w3Ddwtmi7MynSLjD0eJbP0GoiXjfB7dw== X-Google-Smtp-Source: AK7set+Yi0sOfc3PPtYsF0ZJj/tsprBBa0GcKPMA5JmajeDeq21MM5LoyAt7DnhVWhNBheHdoawz4A== X-Received: by 2002:a05:6a20:6712:b0:cb:ec3d:4783 with SMTP id q18-20020a056a20671200b000cbec3d4783mr20343839pzh.21.1678390075426; Thu, 09 Mar 2023 11:27:55 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:54 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 21/82] scsi: arcmsr: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:13 -0800 Message-Id: <20230309192614.2240602-22-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index d3fb8a9c1c39..32bc77200eaa 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -152,7 +152,7 @@ static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev, int queue_de return 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, From patchwork Thu Mar 9 19:25:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B0F0C64EC4 for ; Thu, 9 Mar 2023 19:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbjCIT2M (ORCPT ); Thu, 9 Mar 2023 14:28:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbjCIT2D (ORCPT ); Thu, 9 Mar 2023 14:28:03 -0500 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0A164200 for ; Thu, 9 Mar 2023 11:27:57 -0800 (PST) Received: by mail-pf1-f177.google.com with SMTP id x7so2191910pff.7 for ; Thu, 09 Mar 2023 11:27:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390077; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wYcUKal3ePL60VfjZpcDaHb80w6LZ6piZfKEAvYH9Uc=; b=n5elWFgO6TMJFxYY5asZtBdJgLriwkxv90jOV+CRfqgg47o7TRYUuPhK0nmQMHNuQc 3M2fafRxtoOA7QNwXnETFiRcT2rX3taDqJpqNzUr2JBQp0Set9wiDvcrDi2jypqChbQ3 eFPKwTilt1d6ZpAVxQFrUhauz4ev22T87frJ9JjKG0OBpU0wNnyXJk9vVjZPKmLQLL9P jKXOWBuX0eeDy6l/reCB+tt4FLiZ75aa4JMTA3h7Qv+BSbWhmozNx5n2NTFtxqheE+OB qMvYzNAhJzWTzCBKXqSyosgz5Gy5aDUA2KXZ+6xfxI4eWMmZn8O4hiecGa6y1HodnESZ U92Q== X-Gm-Message-State: AO0yUKVepguKZErLD7Isne6TWp83RRPUJDO6q0M3smyKT+/ja4Ap2DZA 27ahmTLbSOJ24Z35fmS7b1Y= X-Google-Smtp-Source: AK7set8anRgufQbZOqeDUdajZ6FMFnfjkR/+Vsh1MB82Ne2VXUDANqaD1YjIsLSL813Lz+n62Ht08Q== X-Received: by 2002:a62:1d13:0:b0:590:7330:353c with SMTP id d19-20020a621d13000000b005907330353cmr22365746pfd.6.1678390077182; Thu, 09 Mar 2023 11:27:57 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:27:56 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Russell King , "James E.J. Bottomley" Subject: [PATCH v2 22/82] scsi: acornscsi: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:14 -0800 Message-Id: <20230309192614.2240602-23-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/arm/acornscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index 7602639da9b3..0b046e4b395c 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c @@ -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", From patchwork Thu Mar 9 19:25:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A3EAC64EC4 for ; Thu, 9 Mar 2023 19:28:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230404AbjCIT2V (ORCPT ); Thu, 9 Mar 2023 14:28:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230163AbjCIT2G (ORCPT ); Thu, 9 Mar 2023 14:28:06 -0500 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B4F81ABE5 for ; Thu, 9 Mar 2023 11:28:03 -0800 (PST) Received: by mail-pf1-f180.google.com with SMTP id c4so2234627pfl.0 for ; Thu, 09 Mar 2023 11:28:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390083; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c47+d0pz7DNihHgR0GI5I+QfVkFleIpC/pj+/6FjG7w=; b=BqDoyDeB4r/Ut57NZrdTAjSolo4DsBi/hLjVhIYR/NMO7XDdn013Cx/fggJuGvAy0y w6PI2OraDJKZNYlTDYsuTOtNeBxLvt1EF55hi/jLjt9PIE9RTo1UY8XBCtLPvW0KKtxc kVh2N39sNL3bFbnapatvBnPefUBsKu/7ETWCHhCK3FRc4hOx6uQCwxJ69a6zpO+Iv5MM yPCe6rrSR79MlcFwuUwCxwh1CzaczuxwO7lUfsX3zpuLKYwNHeGcIVMmAgGckhux5AR9 bVK8JQeZFPQ4f3rU1fGtWaeoPvghXjNeikgHsCIXqFbTM2PtZ4b/L84XdaKRzM0WykuM UMuQ== X-Gm-Message-State: AO0yUKWPRsWiK23KQDNaLjcZtmgJMuAjgyMImIf7RM2fw5uao5imY1a8 6HQmx5n1QYwOWOPJ+e7VRoc= X-Google-Smtp-Source: AK7set+PAIBlIkPrNLMSRv+KazQWlgooZ08W+wkRPwx448GZQhoOB3t6+kgImBMylp1kHUjgz0f8Zg== X-Received: by 2002:a05:6a00:a81:b0:5a8:aa5e:4bc3 with SMTP id b1-20020a056a000a8100b005a8aa5e4bc3mr29620006pfl.1.1678390082667; Thu, 09 Mar 2023 11:28:02 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:01 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Finn Thain , Michael Schmitz , Russell King , "James E.J. Bottomley" Subject: [PATCH v2 25/82] scsi: cumana: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:17 -0800 Message-Id: <20230309192614.2240602-26-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/arm/cumana_1.c | 2 +- drivers/scsi/arm/cumana_2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index 5d4f67ba74c0..d1a2a22ffe8c 100644 --- a/drivers/scsi/arm/cumana_1.c +++ b/drivers/scsi/arm/cumana_1.c @@ -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, diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index d15053f02472..c5d8f4313b31 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c @@ -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, From patchwork Thu Mar 9 19:25:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661508 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DCBDC64EC4 for ; Thu, 9 Mar 2023 19:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230435AbjCIT20 (ORCPT ); Thu, 9 Mar 2023 14:28:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbjCIT2I (ORCPT ); Thu, 9 Mar 2023 14:28:08 -0500 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3C272A6C0 for ; Thu, 9 Mar 2023 11:28:06 -0800 (PST) Received: by mail-pg1-f177.google.com with SMTP id 16so1695087pge.11 for ; Thu, 09 Mar 2023 11:28:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390086; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OIPb3HYAXuW5r7Endmq1PVAaSjgIGGcvZm+x2bOLt/M=; b=o+q7B5vWET7UTDYotPegqHUr9vRSwmvw+NMb9P/Iv2PtU5nMEENKWzv8k5a5FL0Pz2 BxDZLNoEvbRPBrOWv5ChpY0q52bo+Urn63AqcvcdqQV8HPB88xvUrnQcLUpEtFCApBzJ fYxpy5SAT9dDnm9EjaecNWUx1HDkN87UXaJgxTrqXhdt/NtlH01E6VetdYN3oiioTDX3 UNFGCLSCNxr2WjFt4WOVdOWFjGGOFUONo+0LLs9uzAPN5NHCyLJGD7/qG6i+JlkSIo24 fA+QOoQs1i6qgyIJC0+9gSzgzA2YwPrPHvWy8Y5W7qrO/h885N+mShNcYWFu/sTXk8Ji 7m/Q== X-Gm-Message-State: AO0yUKU+SUBk+BfiNOSFcPGww+olF+XlHczGh8JJ7ErgV/GYG7dX0CZm cO1F5+LUTOlZDNwu5Nn9IIw= X-Google-Smtp-Source: AK7set+QWozXYtQz9RHcf67ybPqy3fTkeYUu7lA/3gu8+ZRRx9fBpzOlIaL9dFXgLmuGSi2rB+yZkA== X-Received: by 2002:a62:1748:0:b0:5dc:6dec:e9b9 with SMTP id 69-20020a621748000000b005dc6dece9b9mr21508420pfx.21.1678390085907; Thu, 09 Mar 2023 11:28:05 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:05 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Finn Thain , Michael Schmitz , Russell King , "James E.J. Bottomley" Subject: [PATCH v2 27/82] scsi: oak: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:19 -0800 Message-Id: <20230309192614.2240602-28-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/arm/oak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c index f18a0620c808..d69245007096 100644 --- a/drivers/scsi/arm/oak.c +++ b/drivers/scsi/arm/oak.c @@ -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, From patchwork Thu Mar 9 19:25:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E08ACC64EC4 for ; Thu, 9 Mar 2023 19:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbjCIT23 (ORCPT ); Thu, 9 Mar 2023 14:28:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbjCIT2L (ORCPT ); Thu, 9 Mar 2023 14:28:11 -0500 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B49FF28D08 for ; Thu, 9 Mar 2023 11:28:09 -0800 (PST) Received: by mail-pf1-f174.google.com with SMTP id c10so2167981pfv.13 for ; Thu, 09 Mar 2023 11:28:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390089; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ts+vWJKv0MXDJEA4JIO9+AM9uvvvxXowXRyy3KeGtYI=; b=mwOOERH4wkNbxyEu6RbIt9CURCItAGscjBcbWnI3g+3c8jX4oTeWhEbevm69rgIg6n 0jlkimWydn+pLXR45KKAGeMyBWjRMOsRxuk6rQ48UY9xmKfNyM4P6dkJFO0q6vOvYV7D cPYZ/AMF4YPcFTR+SIMf+SlNChxYD74nLXAWV3hhB6e/6m1PQv+5OPO7T4QKJiM1/5O0 Rxno7NaiQ9h9EFJnMoaIKCqkHmvij1YFvrakt0uZkLeqU1yO/uD0jsr94Lr0FRtyZgrd jr2qvZ3LEwWiDbmmIMJGJkF4OdxYKRp5QKDQ+lk9O5mzpVgPyhF9/86TXQ31sxJX8Evw C4aw== X-Gm-Message-State: AO0yUKUqD5jk3bmcMRSK1GGQQNivGJk0NexlsoHu523Ix2iRph8MClO9 2eS1GJNY+QxeyVI8wrlmHjU= X-Google-Smtp-Source: AK7set+4LeH98mTYKOvLFJCTK6ZucVQYBezHfah/syIuZTi6ZI/U3F7M7ksioNytLmT33IJZ/FHf6w== X-Received: by 2002:a62:2586:0:b0:5d3:81b4:db5c with SMTP id l128-20020a622586000000b005d381b4db5cmr2902115pfl.4.1678390089163; Thu, 09 Mar 2023 11:28:09 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:08 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 29/82] scsi: atp870u: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:21 -0800 Message-Id: <20230309192614.2240602-30-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/atp870u.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index 7143418d690f..2a748af269c2 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c @@ -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", From patchwork Thu Mar 9 19:25:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661506 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04857C61DA4 for ; Thu, 9 Mar 2023 19:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231182AbjCIT2m (ORCPT ); Thu, 9 Mar 2023 14:28:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229976AbjCIT2P (ORCPT ); Thu, 9 Mar 2023 14:28:15 -0500 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B4B2B9DA for ; Thu, 9 Mar 2023 11:28:13 -0800 (PST) Received: by mail-pl1-f170.google.com with SMTP id v11so3093752plz.8 for ; Thu, 09 Mar 2023 11:28:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JFvxo/sJNe3B0K/5I7wr+cSfqXHj+OqtPwyJqG3lYLo=; b=mA4bsxW6VloVePCSArcQz6teSTdBLCZGPEzfw6PFiIpSalp5NqyYI8+KR2Prge/WrK hfFdaeq7UO1VFp1Afb6Oxi2Q/a58//3h4a0X5FjcNC1rY5wP/gOyl8jXtw3yVoCmAjg9 IjnYSyjZ8fxuuwLzh+JmYNJuDNrxxMo3PxjptCWUw1bmSFfpLmk8FVdY2Ko4sSCM3KN/ Sej4vtpKqntjRdUne3CorZRh54kYjlfjekNqzd4gmG6TLdPnQ3OuK0QFofSwD7dNRVKO j/4NP9oGRC4CTugHfLyT8udVUDZwFt3Gg6W6UNeSS0qlzdFbXunpka4HSDHONQ8wd4Qb aD2w== X-Gm-Message-State: AO0yUKUqLoLZYLKPZViWxAgbeJQANIiMc6tLn13u7RG3f4prCFG5XdYM Yuz504mzzsr1B0pvKG8WXwA= X-Google-Smtp-Source: AK7set9fVSJoDYha8UliHYU0/5iRbLxwxU+UeA2sVCi33TTPUyv/GRksKErjwOMnxaisuHOb7QNpJw== X-Received: by 2002:a05:6a20:12ce:b0:cc:b73a:1079 with SMTP id v14-20020a056a2012ce00b000ccb73a1079mr25836328pzg.62.1678390093052; Thu, 09 Mar 2023 11:28:13 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:12 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Finn Thain , Michael Schmitz , "James E.J. Bottomley" Subject: [PATCH v2 31/82] scsi: dmx3191d: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:23 -0800 Message-Id: <20230309192614.2240602-32-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/dmx3191d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index a171ce6b70b2..dfb091d34363 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c @@ -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", From patchwork Thu Mar 9 19:25:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3284BC61DA4 for ; Thu, 9 Mar 2023 19:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230416AbjCIT2y (ORCPT ); Thu, 9 Mar 2023 14:28:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbjCIT20 (ORCPT ); Thu, 9 Mar 2023 14:28:26 -0500 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 446F062D9E for ; Thu, 9 Mar 2023 11:28:24 -0800 (PST) Received: by mail-pg1-f176.google.com with SMTP id d8so1718559pgm.3 for ; Thu, 09 Mar 2023 11:28:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4uxxN7Q5Bd2Nk0RDe6hDV+Z1h0pZWa/g2GzvVwJGpA4=; b=kbnsbZ/7KZmwFr1hdPXPKYy/gO31JkiqKcrFhpvQDZGT0i/kBnnkrAk6KQRbXOst3F jwK0RipK1hDa8Qy6+1g+klZtHoJAfSNkDxL8SDHN45dvjABnSZ1tgTZuwUWJYi1lUQ3L UxJgLo/lD6SwzG8BmffPUyWYHZnTq6Mm0rrzcpHkBbaNI1xPbtlkW1A/tLExLbUEAJxE KfuDFaZ/sVDh+VuTDpdtj+WcK27XJnVGHaPJfVHr9WjSslxB10lGrT38qDHSI5S4Fjei qnsUXsElEltdpwUTeTc900JqxLmH9llTZ9n8JNOhF2C/GwI6P6WdofoFhy2JGzgYH1xz Xp1g== X-Gm-Message-State: AO0yUKUjlgS/lZwdR68qnF9VE6DQCYxldZVkfsnAQ4+zHKSlBaKREuxv LnC1H05xlO5cfXNn1+SrLkA3rV2Gmess4g== X-Google-Smtp-Source: AK7set/+wpS+GcRlw6XYkqB9FtNTcKoHLK1bw94aGsIR2MyhSucXGF358CwEnXtGS7f7XjgY5VoRBw== X-Received: by 2002:aa7:9a0b:0:b0:5dc:e57:e0e7 with SMTP id w11-20020aa79a0b000000b005dc0e57e0e7mr17109023pfj.22.1678390104261; Thu, 09 Mar 2023 11:28:24 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:23 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Bradley Grove , "James E.J. Bottomley" Subject: [PATCH v2 33/82] scsi: esas2r: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:25 -0800 Message-Id: <20230309192614.2240602-34-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/esas2r/esas2r_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index d7a2c49ff5ee..f700a16cd885 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c @@ -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, From patchwork Thu Mar 9 19:25:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661504 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5452C64EC4 for ; Thu, 9 Mar 2023 19:29:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbjCIT3E (ORCPT ); Thu, 9 Mar 2023 14:29:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjCIT2b (ORCPT ); Thu, 9 Mar 2023 14:28:31 -0500 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B58536A9E8 for ; Thu, 9 Mar 2023 11:28:28 -0800 (PST) Received: by mail-pj1-f49.google.com with SMTP id x20-20020a17090a8a9400b00233ba727724so6321768pjn.1 for ; Thu, 09 Mar 2023 11:28:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ldCwiaYTLduiQcwSYGjGWFRviZrHcq79whkQrMLz5c8=; b=krYVIhXaDB13sMCO4PotoBqKbg9K4xzTAydW/KmlS8YHNGr2Qhv05iEDfU2hnphr3i TnqiIscmsNa/l+3DXpjIxL+M33DvFboqPFn+JDQ/5Ah9kuZmA6ar9B9dOJ9Eep++zjxo ly7EGQG6RCgY0N/Wr+m45+o9k7u4fJbIfnWS2gkJWMqTW8ce3s4QOVmSgdAd4K/Qh9P/ 0lG1GNpiAV8YB7C5AQ2rQdJMmTgw1ULmw5pskV+/MdigBpfmf4GHaUw1UOpu4xSe6tLz J2kU5UUxuKhtYWAWhS+SSxab7HecwOi9/f/3z95hnpmuywQCElRW/V7PN/Y8BSB8njX5 0img== X-Gm-Message-State: AO0yUKVhEFdziS3RAuWXvcN8SS45cfYnc/rrwdfE4YcbZ9RGNWjrVb+s ireiz6VNJ8Vv/qcrb8ckEcY= X-Google-Smtp-Source: AK7set92T2vKY+Z2ijlk2FREUOvCr72gk0UfunQILUfQ4IZ69x+5qPYXDKOWTEdek4z0tNe0fUIwxQ== X-Received: by 2002:a05:6a20:898f:b0:cc:fced:f700 with SMTP id h15-20020a056a20898f00b000ccfcedf700mr22298809pzg.30.1678390108253; Thu, 09 Mar 2023 11:28:28 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:27 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Hannes Reinecke , "James E.J. Bottomley" Subject: [PATCH v2 35/82] scsi: fcoe: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:27 -0800 Message-Id: <20230309192614.2240602-36-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/fcoe/fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 38774a272e62..f1429f270170 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -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, From patchwork Thu Mar 9 19:25:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D791DC64EC4 for ; Thu, 9 Mar 2023 19:29:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230446AbjCIT3Q (ORCPT ); Thu, 9 Mar 2023 14:29:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbjCIT2j (ORCPT ); Thu, 9 Mar 2023 14:28:39 -0500 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C01E82343 for ; Thu, 9 Mar 2023 11:28:32 -0800 (PST) Received: by mail-pg1-f174.google.com with SMTP id q189so1706693pga.9 for ; Thu, 09 Mar 2023 11:28:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nGX3sCfP9S9SbUwoJVF9uNLn7ct4AxiUrRAsNV4NPzM=; b=aSI6YWIp1wV47IhIVJSmH4JtpfYsQIp5C7C6dx+9Jal97Sqipk4Uic6pTPBNKQAH0W rz/BDHjC9PGHdyrhAOCMkHSnDFv+H3n4rlpNntFd3IRiBDXYW/OVBtmMeXcr3kj6Y1XL DuwY7Q8de8+Q2GTe9WvehsHI8jDxBxxBA9Qy1P+j8z2La7hZpDq/nywSn9P/P7FRYOXt vDWqC/t8JEGbfFeW3gCPwkVt9rsYcKVzyClWJhBphUycDE48rtsoCpNWR68plxj8pajn 2wJds3n+S4LirxgsH7H1JaWoSS297YL2wIpBqAlizAoQxkAEWy0o3HUMuWdUg0Z4GLFj mzyw== X-Gm-Message-State: AO0yUKU8o3F2P7ORf7cgQwZ43uJGn365WRHr2yLSLppjszF3giWOixA+ 9HVtSEwoA5FjEfuReNAvKhY= X-Google-Smtp-Source: AK7set9mnmWa3xnYLJpagKqDnHIEWH4JcGTGxIYoGretC5Fy+PBNvQWRWd2xolbb/+0X4YiK5Ig7mQ== X-Received: by 2002:a62:1ad4:0:b0:5cf:4755:66d9 with SMTP id a203-20020a621ad4000000b005cf475566d9mr16433331pfa.24.1678390111696; Thu, 09 Mar 2023 11:28:31 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:30 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Saurav Kashyap , Javed Hasan , GR-QLogic-Storage-Upstream@marvell.com, "James E.J. Bottomley" Subject: [PATCH v2 37/82] scsi: qedf: Declare host template const Date: Thu, 9 Mar 2023 11:25:29 -0800 Message-Id: <20230309192614.2240602-38-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 35e16600fc63..e7f2560b9f7d 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -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, From patchwork Thu Mar 9 19:25:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661502 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E45ABC6FD19 for ; Thu, 9 Mar 2023 19:29:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbjCIT3R (ORCPT ); Thu, 9 Mar 2023 14:29:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231178AbjCIT2k (ORCPT ); Thu, 9 Mar 2023 14:28:40 -0500 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0057BA03 for ; Thu, 9 Mar 2023 11:28:35 -0800 (PST) Received: by mail-pl1-f170.google.com with SMTP id v11so3094661plz.8 for ; Thu, 09 Mar 2023 11:28:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Eqt+ITNuMCviCw/LJKFT6yVsmzr7b0qC6Hk9y7auM8=; b=hqSygRfAxoInbXh74huygfzS4WZvbXUHvcaf85GwXWulmZ67duEtRB8XX5UXaE0RRv 2QfDUfepQosomLZgbcHlqYKKiC4njsRoe6hQPKQfVJxoUEiSkTHuAXTbVDZGd4ahj+Xg 7mllOW6eDIP5TAms1Z8BfhTJjkVQnNA13LKVxVznygBfsyBs0YM+KgGWiLoR3UpWDRfD c0m6aUchRYzcYjM7bPrPV9iKYGVxcSFrZFiYnAWzI5I38JcLWiaykjLWdx80dCLo4GlX ewdehrG1IRaNwBx0uXbv9BB9woxFse8QBwfwCqQT9v2ThRULf3y6r5zXt/VLySSSbEfu 4t1g== X-Gm-Message-State: AO0yUKW8vTycHiwHEMvkyAolRWEgnfx3L0M2566r5Zzj3YbV6Cws7uMd 0WCHVOEN4zlm4cJj1lxIqcs= X-Google-Smtp-Source: AK7set8NTNC7BOQybd8NwvIRT7FSQlkYtIXtduabxY4jRlVapc+2DQKW7AwQUJaunZ068rO3cOUW0A== X-Received: by 2002:a05:6a20:8f09:b0:cb:cfb1:5009 with SMTP id b9-20020a056a208f0900b000cbcfb15009mr28844865pzk.34.1678390114925; Thu, 09 Mar 2023 11:28:34 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:34 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Finn Thain , Michael Schmitz , "James E.J. Bottomley" Subject: [PATCH v2 39/82] scsi: NCR5380: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:31 -0800 Message-Id: <20230309192614.2240602-40-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/g_NCR5380.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 0c768e7d06b9..f6305e3e60f4 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c @@ -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", From patchwork Thu Mar 9 19:25:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8249FC64EC4 for ; Thu, 9 Mar 2023 19:29:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbjCIT3U (ORCPT ); Thu, 9 Mar 2023 14:29:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbjCIT2l (ORCPT ); Thu, 9 Mar 2023 14:28:41 -0500 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E4D44200 for ; Thu, 9 Mar 2023 11:28:38 -0800 (PST) Received: by mail-pf1-f178.google.com with SMTP id fd25so2212119pfb.1 for ; Thu, 09 Mar 2023 11:28:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FbYfs5uQ0e5wWth5IkPXTdB9pAkFwtiNTi+fs2yTTfk=; b=xU+Qt0//nI5Uz4WuB3EDpmGW8Kks3lt0fa5+5nieO9AmlY+S3sOJvSA7rBhngXq83m yqJaCwQIq2Bje0gdqpJRwEsS/vjvJkzjnvn3iS/zpufG5QKLhO66CMkGl2k/4xRuOviu nRPGOikPO3YswFolJ4VJ6Q1g0uFRRoQvs9dJacg3ZgNB0WQaIqSKKhm+6TOkCB/oIdPb vvBAG0a8KMsHCDvETrjxoiiPS26NXlCQQn849eJC8mN+uxzKzrmWXIEIeE/QxIHzvuVn JHUT/yOSK6cql23oKqMfUA3NhOH0IlcO/9HVTWf2/EO9P5yFU3j5ENkZn+YxIgKq2OVr z3kA== X-Gm-Message-State: AO0yUKWbqp23VYMOTDDB9A5D7QewtUkQLa+M1B1TxsLUZ3ObuPkWc6EK veRSj1JzrNvSYfbaKLYLeMc= X-Google-Smtp-Source: AK7set9Y6/1eH8MLmbItDr/4SbIjzAhB8mmPI1Hddc64nfolJ6k9opoB9XK6+dN9lSEzicNf/KlXHg== X-Received: by 2002:aa7:96c9:0:b0:5a8:c2bb:f0c4 with SMTP id h9-20020aa796c9000000b005a8c2bbf0c4mr18083918pfq.13.1678390118279; Thu, 09 Mar 2023 11:28:38 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:37 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Xiang Chen , "James E.J. Bottomley" Subject: [PATCH v2 41/82] scsi: hisi_sas: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:33 -0800 Message-Id: <20230309192614.2240602-42-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Acked-by: Xiang Chen Signed-off-by: Bart Van Assche --- 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(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 6f8a52a1b808..6ba59ab8c1db 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -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) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index d643c5a49aa9..98c978df84d6 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -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, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index cded42f4ca44..95de3e2caaee 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -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, diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 0c3fcb807806..d65ba65b6dac 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -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, From patchwork Thu Mar 9 19:25:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661500 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95FF7C742A7 for ; Thu, 9 Mar 2023 19:29:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231181AbjCIT3X (ORCPT ); Thu, 9 Mar 2023 14:29:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230242AbjCIT2m (ORCPT ); Thu, 9 Mar 2023 14:28:42 -0500 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C9F65B5FD for ; Thu, 9 Mar 2023 11:28:42 -0800 (PST) Received: by mail-pj1-f43.google.com with SMTP id y15-20020a17090aa40f00b00237ad8ee3a0so2930418pjp.2 for ; Thu, 09 Mar 2023 11:28:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=239hkCXB94hvY9rEBCDXzyIlK2lqlyBB9GRut91MAN8=; b=eqTJB1zqjJyUtPuVjxtFyy8oyqsK2IHnKXl7gq8ZR6T6Do3YDB7saXdmrW7bSCvKsk D+4PzeL5Dm3lhfssn4pptBAwjrEdMyfLcD+0rnWpnQ7kxYa/4n7SlENF+GddgQ9N4AtN h+RuiacuCMnP6ZnLQibdMgJWN18a+O8qzYNEbiWPpAkPjZrv08Rl2f13YhZ6FYT8/QVC 0YLlazZFczVWaoFbcOIHj8pzrzV1S1Noj5CVaZ0Jie5Q3U5/CF+HPE34ZaysBpnmUE2F eUogOyJW7u/FyJxrlSxT1tgYwL3IHghO0mcZoy2AAxBBGFLBeQczw6SktfaNI4edbskn fmDw== X-Gm-Message-State: AO0yUKXjAKirHrxqvDwVlp3l1kNaRwfzHilyYeMjx3FIJQtRTLvr2Qfv rkBmwES3IrTbNf/I5jZU4gw= X-Google-Smtp-Source: AK7set+CXTe7Xl6jsCmFRX+UQZt0GRolF9g9Al8q8rW/Z2DXDut3RBrzerB4mnELOD5rJkq2UUUBmw== X-Received: by 2002:a05:6a20:7d8b:b0:cc:9b29:f621 with SMTP id v11-20020a056a207d8b00b000cc9b29f621mr29554462pzj.42.1678390121669; Thu, 09 Mar 2023 11:28:41 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:40 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , HighPoint Linux Team , "James E.J. Bottomley" Subject: [PATCH v2 43/82] scsi: hptiop: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:35 -0800 Message-Id: <20230309192614.2240602-44-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/hptiop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index 7e8903718245..06ccb51bf6a9 100644 --- a/drivers/scsi/hptiop.c +++ b/drivers/scsi/hptiop.c @@ -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, From patchwork Thu Mar 9 19:25:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D6E5C64EC4 for ; Thu, 9 Mar 2023 19:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230256AbjCIT31 (ORCPT ); Thu, 9 Mar 2023 14:29:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbjCIT2q (ORCPT ); Thu, 9 Mar 2023 14:28:46 -0500 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3BA455A0 for ; Thu, 9 Mar 2023 11:28:45 -0800 (PST) Received: by mail-pg1-f181.google.com with SMTP id p6so1743883pga.0 for ; Thu, 09 Mar 2023 11:28:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390125; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ksKFgRH4rYvlBG1yS/w98H9HGUxvKE6kRBa+hfKL1B0=; b=aD3NPOLqK4rM3+1jJJIs2QcJfpuFe1T/pDxpkzpSPnnoZQGmAoT0z1+hx5WGIVsDl5 cZf9TnLEIeH3NLXYxaPaFcOqONj0x+UF25gqbo1ZECxV5aVMNyxFTNs+G2ZPTChZ6t5q TcaYlF2gIYuzzMXIrAbPZXHLxBwxZYJftvpJlgeAVV/35mZED09Gj5LGGPKAUBEhKqMS aRib0Fnexf3PBrMlcbyIVazxajfhmgjSdiINzDwe8/6h+jFjBm1q/mu5fVfwOzlGGK/e Zjav3cpVV9AcHOVGgAVLyNHV3h/rHZo2nyhd15Zbk+3Rc3Dl2wRlE0iJ9a4X+/Rm48K8 sbnQ== X-Gm-Message-State: AO0yUKV82vyC/pndqRqbQbt1G7nXGl5P17OdhhcDLiUb7V3WSutHPkKE MA5q++/gCvFWNybs7+2zEDk= X-Google-Smtp-Source: AK7set+moxnUAiyExP8Qy1sLoZmVgDuBIbxWTdY6gPEZWMwTX5RraDFxYhZg1TQdUuIGHGOJhtf5/Q== X-Received: by 2002:a62:6490:0:b0:5a8:beb3:d55f with SMTP id y138-20020a626490000000b005a8beb3d55fmr18441516pfb.32.1678390125230; Thu, 09 Mar 2023 11:28:45 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:44 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 45/82] scsi: imm: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:37 -0800 Message-Id: <20230309192614.2240602-46-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/imm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 7a499d621c25..07db98161a03 100644 --- a/drivers/scsi/imm.c +++ b/drivers/scsi/imm.c @@ -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, From patchwork Thu Mar 9 19:25:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661498 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CFB1C61DA4 for ; Thu, 9 Mar 2023 19:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230052AbjCIT3j (ORCPT ); Thu, 9 Mar 2023 14:29:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230163AbjCIT2v (ORCPT ); Thu, 9 Mar 2023 14:28:51 -0500 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 804CFE253C for ; Thu, 9 Mar 2023 11:28:49 -0800 (PST) Received: by mail-pj1-f47.google.com with SMTP id kb15so3074641pjb.1 for ; Thu, 09 Mar 2023 11:28:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=px+VcymeEwEDAGjtrWl3/YMfcdfrocZHJayOmxP7gJo=; b=12rkPTuUkDgLu8fOqFzJJst7V1KdmkDjbHOQZz+O+F6ej5joJEpzzalYuDAnwevnJA V0OHoXGizeTymFVpWjBZVE7cfyGZFLtYJVI0vSWZFh2LCBk3SGpEgZ1MCtvUNhndbHth 0gnwrY207woUZ/O7IuREPrwKHz14E45V2TGXVFQSZ1SybBqawDtI80wQC2fGmKsvLtlC lyrGreJTZokvvSd98AWN+qhzDD9f/CP6wGUVNLIv0FxnGesRSkOVTbcpJQlbTQV/J6Wi /9Euk1f7z1fVv423ie8q/q2o9T7KQY9zG6zmlGQcr3mpEv6cDjfENyJibaxnBmvSfBZP xs4Q== X-Gm-Message-State: AO0yUKX8wqdLip5kyiFTmfFoMKiRCHEoQ3xvIjCuiKbtyxrb/6KeQ6tK qTLIJwqZCmpP/XrCLZcR2EY= X-Google-Smtp-Source: AK7set9EHhL8B6f9aOYBZvxde6CLmNM+DzVChyMJm2ChtirP4WcPrpev7a8WcrEDNAZhqkALrJjKbg== X-Received: by 2002:a05:6a20:1443:b0:d0:15c9:4e68 with SMTP id a3-20020a056a20144300b000d015c94e68mr14774869pzi.62.1678390128857; Thu, 09 Mar 2023 11:28:48 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:28:48 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Brian King , Brian King , "James E.J. Bottomley" Subject: [PATCH v2 47/82] scsi: ipr: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:39 -0800 Message-Id: <20230309192614.2240602-48-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Acked-by: Brian King Signed-off-by: Bart Van Assche --- drivers/scsi/ipr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index c74053f0b72f..4d3c280a7360 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -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, From patchwork Thu Mar 9 19:25:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F22DC61DA4 for ; Thu, 9 Mar 2023 19:30:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230113AbjCITaC (ORCPT ); Thu, 9 Mar 2023 14:30:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbjCIT3L (ORCPT ); Thu, 9 Mar 2023 14:29:11 -0500 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2255F16A4 for ; Thu, 9 Mar 2023 11:29:09 -0800 (PST) Received: by mail-pg1-f178.google.com with SMTP id s17so1719853pgv.4 for ; Thu, 09 Mar 2023 11:29:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HXje0fSC3qBWH3+uZT/SvSD9eSu5SutEFmemJCL9GkQ=; b=wXW5u028V0bhO0HqUVqSZVnzpyr8OKcf7bLYkDps01cP90/IcBfxn95p5YhOLhSsh0 0VoVTIHBZjexHqvlfYsB3JwvFoeUxU+9VrP33S5wQvHjsBwHVRx4WF7qllm2PkQBElEu fBB1bV0LMGz5YwKXSflzb+io5sfI9/O6dtu/woBNtZ3N6IQpc5xAUKxqMAmbNQbznrTC vSDX9hLdctqPuPXl2Wi85wko8YjXwbmYJRsilUs4LmbZwshij1WnznUBKAhPSmVWdOgc +8qlzM6HW//ybdwkNsD0JrWrOUgysHRL6o0EgnC0l1CYcp2/Aac6KKzDb7mzQyTTZYY+ 3eYQ== X-Gm-Message-State: AO0yUKVwqbnxDKROE1bmqZWG4cvMIe4PPq0ErwpBkxd3IERWjXUG0gzI QgHSJlCLwpDJSI8A4Nz2Dhw= X-Google-Smtp-Source: AK7set/QAlDXTy2MpzY/R6aY93LgA2UjnPvH1/VDZCieFY98OFF/6ZcRQ5gBWF0cYbrFmYn4VGYHOw== X-Received: by 2002:a62:1792:0:b0:5a8:cec9:6ab6 with SMTP id 140-20020a621792000000b005a8cec96ab6mr19510628pfx.31.1678390148478; Thu, 09 Mar 2023 11:29:08 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:07 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Mike Christie , Sagi Grimberg , Max Gurtovoy , Jason Gunthorpe , Leon Romanovsky , Ketan Mukadam , "James E.J. Bottomley" , Nilesh Javali , Manish Rangankar , GR-QLogic-Storage-Upstream@marvell.com, Varun Prakash , Lee Duncan , Chris Leech , Jesper Juhl Subject: [PATCH v2 49/82] scsi: iscsi: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:41 -0800 Message-Id: <20230309192614.2240602-50-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche --- 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(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 6b7603765383..bb9aaff92ca3 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -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, diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 50a577ac3bb4..5d416507947b 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -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, diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index a3c800e04a2e..9971f32a663c 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c @@ -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", diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c index ff9d4287937a..ec6530240707 100644 --- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c +++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c @@ -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, diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index af281e271f88..eb47c8c96d0e 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c @@ -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; diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h index d8fc7beafa20..d92cf1dccc2f 100644 --- a/drivers/scsi/cxgbi/libcxgbi.h +++ b/drivers/scsi/cxgbi/libcxgbi.h @@ -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 *); diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index c76f82fb8b63..6df2f4041f12 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -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, diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 127f3d7f19dc..0fda8905eabd 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -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; diff --git a/drivers/scsi/qedi/qedi_gbl.h b/drivers/scsi/qedi/qedi_gbl.h index 72942772b198..0e316cc24b19 100644 --- a/drivers/scsi/qedi/qedi_gbl.h +++ b/drivers/scsi/qedi/qedi_gbl.h @@ -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[]; diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c index 31ec429104e2..6ed8ef97642c 100644 --- a/drivers/scsi/qedi/qedi_iscsi.c +++ b/drivers/scsi/qedi/qedi_iscsi.c @@ -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, diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index e39fb0736ade..7282555adfd5 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h @@ -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); From patchwork Thu Mar 9 19:25:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661496 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84BFDC61DA4 for ; Thu, 9 Mar 2023 19:30:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbjCITaL (ORCPT ); Thu, 9 Mar 2023 14:30:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbjCIT3Q (ORCPT ); Thu, 9 Mar 2023 14:29:16 -0500 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E05F2F16A0 for ; Thu, 9 Mar 2023 11:29:13 -0800 (PST) Received: by mail-pj1-f49.google.com with SMTP id ce8-20020a17090aff0800b0023a61cff2c6so6603996pjb.0 for ; Thu, 09 Mar 2023 11:29:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=THmZYnay788Z96nrcUtNDJXy0MOLvmys8mHIpIwdLfY=; b=152eKzOk4ljhGZCDQ4Fvf3rkPyx3E2dty/LNdwBDnpo5PrrlnNvDrzVIi4xD68POkP PS4tTEWiwCd8clwxF9tAAwz6f3+ajah5+XNtkt0CKQC1BFsZ+QOMooU6bjKvjwyHfK0C 4mnlGtGAZ32sLCihWhYFvInbQu3ZxbMKPFKI4ryzB3E0xD1jljZELTylbxIJnV77I/B1 /O7WHrxHalpSh3kElMLZkwSdPWzWR+0eBKO7O6vq5+toouk0C07ONTczE4HAKpaindks eYwHd4WFCpQuVABwWxJrQmKPZW7sknVxnzKP6DJqhVv63S61WijaotpKo7vodiYhawo/ VYzg== X-Gm-Message-State: AO0yUKUTc6NImJGTAltOlayuVU7GOIFjQl/xRwKK4V/oPLqHJtiZ59+Q tHwpYMvdKblRY9jOmwdD0iY= X-Google-Smtp-Source: AK7set8SNoA83pn9KRFbhkU8AMRIuQPXbEctu+B21Sblo8VR2o6mIaiDql+MGlLv0Z2SBzjxUpAPcg== X-Received: by 2002:a05:6a20:a111:b0:cc:d386:ec1a with SMTP id q17-20020a056a20a11100b000ccd386ec1amr25536198pzk.2.1678390153355; Thu, 09 Mar 2023 11:29:13 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:12 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Kashyap Desai , Sumit Saxena , Shivasharan S , "James E.J. Bottomley" Subject: [PATCH v2 52/82] scsi: megaraid: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:44 -0800 Message-Id: <20230309192614.2240602-53-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- 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(-) diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index bf491af9f0d6..3115ab991fc6 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -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", diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 132de68c14e9..ef2b6380e19a 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -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", diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 3ceece988338..406a346cbc08 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -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", From patchwork Thu Mar 9 19:25:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661495 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 368D7C61DA4 for ; Thu, 9 Mar 2023 19:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229706AbjCITaV (ORCPT ); Thu, 9 Mar 2023 14:30:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231148AbjCIT3R (ORCPT ); Thu, 9 Mar 2023 14:29:17 -0500 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E5FA82343 for ; Thu, 9 Mar 2023 11:29:15 -0800 (PST) Received: by mail-pg1-f174.google.com with SMTP id 132so1696259pgh.13 for ; Thu, 09 Mar 2023 11:29:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390155; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dAdiI8QeHjoUkeBCYpg9C4zi1sFNt3WL7fHduN+tVF4=; b=lAP3dAoK0qgZHsam0nxYCCv4tkzEyB4e+LA9DSdxQ/YmZwLx2zui9SrI6Uq9hoytP3 IPb241s2nRiu6LShQkA703Hga0sTNuVkqnO+4qUONy2o8ZOeOShz6IbJVAqNjj4Etsas F4fjrdykGx6h3JOnAhALEPa68nSdXiKzF5xUKLMt+r5TzGwORTxqescPbjfIWE8B75ib 1yACfKZ23yq4PP9NQE86As6jHY0CaklUeFNDR/+K1znhL8tdtWjj89BjP8JfKsggAeS+ 06p6ryqNw6acf0eumVfgLnEUkHjmQH52yzPnjeFJvZtggR8JmG2ZcdLG0ev2luAlEoXK zshQ== X-Gm-Message-State: AO0yUKVmYQ6+K4hpx4n0ehJR4J2nBkXOc5fwCI/vWoo7YKXM7MSRinxd n9ohzUsHkw2gDnrcJprbAAtFA1Q0LknLIA== X-Google-Smtp-Source: AK7set+7kDptN0GMlYvJG3B/dyj2LyJIyD3fB+zI/BAyT4nOqOwUFoe+ILfq/SLqD3D8fF5vRSScww== X-Received: by 2002:aa7:9504:0:b0:5db:ba06:1825 with SMTP id b4-20020aa79504000000b005dbba061825mr20059852pfp.3.1678390155053; Thu, 09 Mar 2023 11:29:15 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:14 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 53/82] scsi: mesh: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:45 -0800 Message-Id: <20230309192614.2240602-54-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/mesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 84b541a57b7b..e276583c590c 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c @@ -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, From patchwork Thu Mar 9 19:25:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661494 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2165EC64EC4 for ; Thu, 9 Mar 2023 19:30:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230095AbjCITaX (ORCPT ); Thu, 9 Mar 2023 14:30:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbjCIT3T (ORCPT ); Thu, 9 Mar 2023 14:29:19 -0500 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D95B2CF0CD for ; Thu, 9 Mar 2023 11:29:18 -0800 (PST) Received: by mail-pg1-f174.google.com with SMTP id 132so1696343pgh.13 for ; Thu, 09 Mar 2023 11:29:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390158; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X5og9in4ZDwqfZwJ0CvUxtEC6V3f2+08GwjGlKQ+E7A=; b=WDkFNsNJjGBhTAwQ7adILfF1N08tD3N93+jGvlVcn2XvyaZTblIVp+/OFryQC/NIrL ehAeAcjaAMufjrOLbofWdMAbij/oyPTbPbXdbIn5VTj0Jg+WglJXBqXGU1xtve/4Y7xH /3lkCA66Ii9Vnt+/SOMX289B7BO+VRWpShiAeHqj61F5qIgBSvRzeiaLurGPBrSjC8Ik BW7gqJKaY+9QE/Ostmjt1G+Y0UW0HveFWqvZSkDzxebI7PITzqReKLYZhGdvnd21hQca LGoLDcc3Hs+N9wtYVHZA1l0FEvR04ILMCDIkV+ZR2Zf0+S5P0wQe6GbhOo360ZILLMZu 6i1g== X-Gm-Message-State: AO0yUKU4sP7K8n/iOiiWhjba62173HCBeJA5jDWjXQRHaXW+rOXF9HJe H7MDkQUpxidtPQGsWPQrRnY= X-Google-Smtp-Source: AK7set8pnCkK1kL2dQUM+kSgX+w31Djnp3ZlLpeLuJGxx/w4ADY74Ed6FaV7O908c+8eciRyQtBSuQ== X-Received: by 2002:a62:1c41:0:b0:5ad:8c9:2c9a with SMTP id c62-20020a621c41000000b005ad08c92c9amr23651348pfc.11.1678390158350; Thu, 09 Mar 2023 11:29:18 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:17 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , "James E.J. Bottomley" Subject: [PATCH v2 55/82] scsi: mpt3sas: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:47 -0800 Message-Id: <20230309192614.2240602-56-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 8e24ebcebfe5..7e4a97c61873 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -11926,7 +11926,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, @@ -11964,7 +11964,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, From patchwork Thu Mar 9 19:25:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09BAEC64EC4 for ; Thu, 9 Mar 2023 19:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbjCITao (ORCPT ); Thu, 9 Mar 2023 14:30:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230106AbjCITaC (ORCPT ); Thu, 9 Mar 2023 14:30:02 -0500 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BDE8F20B3 for ; Thu, 9 Mar 2023 11:29:30 -0800 (PST) Received: by mail-pg1-f176.google.com with SMTP id h31so1716758pgl.6 for ; Thu, 09 Mar 2023 11:29:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390170; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1ZgEqZv012LUY7T6LHCDKEctFV0D//J8gA9RwCm+Bl8=; b=Xi75J3Y6Fip3/fHYE/KOy20mRVVgNEW06BGeHhdbGzVb/KZcf+VnRf4VGogMxas5hp nTBhhNZ+La1wDFkbhr6PnrhIXH7NGoBBRdqvC8t1ksRxGEWsZQu7gjg/X5B4WlJtKcP9 ynTAB2QSuhOuXe6Usz6iLTCYRj0wP49usg83GsSPtnq7O4nRjIz33ZN6qZRuqt4UENaW ksm+f+TDGQIdGtAr8YedbKakJuxbP9NkJkurny0zfBG2Eq458re8+lYAkMCMOx2JN/06 n9eGS8aICIXoIoL9VifoEPJcKa5pY3QVOviAdKx1JCiV4f3BuY+xDjiSn1EQc9NVF4YX 5kPg== X-Gm-Message-State: AO0yUKUYPRYBbKmwrcG42oyTP8DOlmrY0ulFlNeYqC0Gtg9JyTW5rkEk cyK94Lqgpe9liHYQRUqitU0= X-Google-Smtp-Source: AK7set/s1UqPx44ptetSTF1u48c/Z6DydgabYLol+5Vo7HAtjEv2B5snKyfi0Ni0CCKGZxi5RC7A9A== X-Received: by 2002:a62:64d0:0:b0:593:d276:1931 with SMTP id y199-20020a6264d0000000b00593d2761931mr18497009pfb.14.1678390169909; Thu, 09 Mar 2023 11:29:29 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:29 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" , John Garry , Alexey Galakhov , Hannes Reinecke Subject: [PATCH v2 57/82] scsi: mvsas: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:49 -0800 Message-Id: <20230309192614.2240602-58-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/mvsas/mv_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index cfe84473a515..49e2a5e7ce54 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -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, From patchwork Thu Mar 9 19:25:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5909DC61DA4 for ; Thu, 9 Mar 2023 19:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230244AbjCITaz (ORCPT ); Thu, 9 Mar 2023 14:30:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230423AbjCITaU (ORCPT ); Thu, 9 Mar 2023 14:30:20 -0500 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E18DF6B4C for ; Thu, 9 Mar 2023 11:29:34 -0800 (PST) Received: by mail-pl1-f178.google.com with SMTP id n6so3119765plf.5 for ; Thu, 09 Mar 2023 11:29:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390173; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gtXkLpjqkzEtUpPCfZWQmuI25j02ukzVqxS1meSBiZY=; b=LYtIIDDqhM2l0r7+3KGYnmVSKwo6pegUvaXNpil1CKCiFCh8Fm7LvNBog0f0uZ9rxi 6PfP+7SSPmr2Zxym67Lm7et8eG7Xkf0Gn2iegFMgKCkiqYUZ2x1a3IBAC0aCxxE1/uQ9 voYn/DDu04ULPDVhNGS/UqXtMNOFHnymS/hRByJ3JkOfh+Jeer8CR+WqiynTZOlqT84f dN1l1lIeU1rrdALaoCQEzE3sfpdXGAnpjgeKSiR8IETEDfcWZTZhRG+PB0FlRij0tfKd SN4MBcnOefoz0cnBs6MmTxp2WLAOhuNkZyTSxAcwAImJl5VAYGDxhceMpMlrSB6rlh8M YbvA== X-Gm-Message-State: AO0yUKWiG7L87AUQSq40To04Pt9p/GJzCi3ZJyJ3Hy9B+1jq/nMIUOW5 h7zSJ/WwR9c6U038nZA7uMs= X-Google-Smtp-Source: AK7set+9i17kj2Li7d6HtKCvq2sdyY0l1/y9+Oh5aKbO2pMVITsIp554MuNTg1GfOGrg0wymBGw+9g== X-Received: by 2002:a05:6a21:3281:b0:cc:c69b:f7e5 with SMTP id yt1-20020a056a21328100b000ccc69bf7e5mr25808886pzb.9.1678390173519; Thu, 09 Mar 2023 11:29:33 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:32 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Hannes Reinecke , "James E.J. Bottomley" Subject: [PATCH v2 59/82] scsi: myrb: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:51 -0800 Message-Id: <20230309192614.2240602-60-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/myrb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c index e885c1dbf61f..ca2e932dd9b7 100644 --- a/drivers/scsi/myrb.c +++ b/drivers/scsi/myrb.c @@ -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", From patchwork Thu Mar 9 19:25:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A074C61DA4 for ; Thu, 9 Mar 2023 19:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbjCITbG (ORCPT ); Thu, 9 Mar 2023 14:31:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbjCITaY (ORCPT ); Thu, 9 Mar 2023 14:30:24 -0500 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9D67DB4A5 for ; Thu, 9 Mar 2023 11:29:37 -0800 (PST) Received: by mail-pj1-f47.google.com with SMTP id 6-20020a17090a190600b00237c5b6ecd7so7277169pjg.4 for ; Thu, 09 Mar 2023 11:29:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390177; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D8ne1LFtZC0aI46uW+Rpyylv80/ucvjDGf+JX18Z6oo=; b=u2i9bcHK4AxPzLQUJdZygDn/ab7zuJng7364P4VTK1LTnv+mRHKVXI3j9DNa9g3E+P ZpPNC002FKtLJVcCiTSCcXCwaUK52twW0sFNw+zR1UCjZn6Vffkw1hEuVnkKapHP7QZo 8Fmt8QfIXac1KWEOBdfQRywow2R9ALwE2pu5x816F7ik0gEFboI+g262gabWlYHn4r8d VqfJ5UUiJLnLVpUEgz2HOmGrVRwI5vojgbwkfUDllnKzAfjZUGhFl2++mtWxf8FU+6BH zrfG/WCTQrFdwpK3SOZgkns0PG2FFOAcCVPh1An/hJUfxSKzDO/6tvqioQBB7SsFdGrv toog== X-Gm-Message-State: AO0yUKWsYvwrxFIRV+ZcuJ4p/+68Qg2naidIbUIRUmYg7Z43AcB7/osA MkKka6tWWiD8eigVkQXWytA= X-Google-Smtp-Source: AK7set/tMl6cxjCYM8zCUpxo8AbkaUXK4gX+I+/qGUOXjHEmIDpRMB1KxDFDj5+8Hn0YvBBZfoVr1A== X-Received: by 2002:a05:6a20:160c:b0:bf:58f4:beaf with SMTP id l12-20020a056a20160c00b000bf58f4beafmr22556971pzj.7.1678390176983; Thu, 09 Mar 2023 11:29:36 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:36 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , GOTO Masanori , "James E.J. Bottomley" Subject: [PATCH v2 61/82] scsi: nsp32: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:53 -0800 Message-Id: <20230309192614.2240602-62-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/nsp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 75bb0028ed74..b7987019686e 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c @@ -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, From patchwork Thu Mar 9 19:25:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661490 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03116C64EC4 for ; Thu, 9 Mar 2023 19:31:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229887AbjCITbW (ORCPT ); Thu, 9 Mar 2023 14:31:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbjCITai (ORCPT ); Thu, 9 Mar 2023 14:30:38 -0500 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18605F98FF for ; Thu, 9 Mar 2023 11:29:48 -0800 (PST) Received: by mail-pg1-f174.google.com with SMTP id 132so1697104pgh.13 for ; Thu, 09 Mar 2023 11:29:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390188; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T6GsPg2I0LZ32kZN7a19j6uU3awmr2LjY8FTtu+c/bA=; b=18oqnGnpe7PEoAGH2jK9l4nNCEL4KVVUquD19HYe3O9TPRERzQKiA172mVn62qlQK6 sf9RzYnsrD7olYahtfOtfB6HB4xAUor2og9Ba1cavTvBXdatU/InQEfeN7rHA+NtPi2d xJtVh/kgQteCjkSNnoKfLgNGxq9G6PktzlrqnsuN9xUrNa3pniCVJSw8o57xslC9+tI4 OyL7B5Qehf8MYcsbYbNcmK11yvQlsfuQmiK0One3EbrdrpKkykQkKRHV/Y/NEvx35W4v NumBORXuzAMb3vjxunbUTf+FWyIyGIgg5pgQGZaW1NUxBc6OonR3+axcBb+EAa+Jo8/k v6Xw== X-Gm-Message-State: AO0yUKWXkGQIiyaf+e4V0BQ6dfSPdCeJPKpiTLOrute638yukSuP9mdk pzVMazRHK8bK/Mv33qKxbXg= X-Google-Smtp-Source: AK7set+vS0Z3h7W4Ka11Rv6FefNhw8D5wkHV1kJbDfSNoI/1o//Kk+5mq+1g1Avoa+BPNnkRoxcHLw== X-Received: by 2002:aa7:9f1a:0:b0:5df:5310:e2f9 with SMTP id g26-20020aa79f1a000000b005df5310e2f9mr16388839pfr.22.1678390187654; Thu, 09 Mar 2023 11:29:47 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:46 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Jack Wang , "James E.J. Bottomley" Subject: [PATCH v2 63/82] scsi: pcmcia-pm8001: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:55 -0800 Message-Id: <20230309192614.2240602-64-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/pm8001/pm8001_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 7e589fe3e010..8b9490011e36 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -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, From patchwork Thu Mar 9 19:25:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661489 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34D2AC64EC4 for ; Thu, 9 Mar 2023 19:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230269AbjCITbZ (ORCPT ); Thu, 9 Mar 2023 14:31:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbjCITam (ORCPT ); Thu, 9 Mar 2023 14:30:42 -0500 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF9186420C for ; Thu, 9 Mar 2023 11:29:51 -0800 (PST) Received: by mail-pf1-f180.google.com with SMTP id b20so2200067pfo.6 for ; Thu, 09 Mar 2023 11:29:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390191; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/bKU77JUcmdCiHf19hl22iuzy8frSUKxUFEkHosyM1I=; b=W4l8lO33xG1MycfT532jzuj0gtKky31tLSJRpJSzxEGJZqUFra/NXW98afpP+RHhif tAjlYGq4YF+BaFdFgjcnPVCC2bWBKsZTh0Oos1Fwr1yNqKr4V9uarmGsEhpc8a49lW2L BCwzdNqjq/XK1UepA1bpcGdslFO7aSG1GZbRd7eG4UpjOm8SPDQmkZ9aGfohYW1FgdfF h8esWv8c5XQ6TawxKfeR8JaE8lM2cMxEVLqBHwoRXkIuBdZx7PAGWU41dn75GxUYjFP/ QhO/jjIylvefAON1Q4Iyu3P8DUMSk7G+XjlFW319T4dQpQi4ey+1IuQfooHNP9/TRzco w+ag== X-Gm-Message-State: AO0yUKWRqevsBFWIQrm1OXug6MkIh1UzM79op3mgD5EgJIepsG22+yMV rtLOonQtcdonqvvSayaVNas= X-Google-Smtp-Source: AK7set8FbowOaj9Cci/94IuIG+Pz+D8N3eLuq9i4dqjKCRoHf+CJU9RwjOJ9b6UZFasG2/dxu0QerQ== X-Received: by 2002:a62:7b0c:0:b0:61d:e8bb:1cb0 with SMTP id w12-20020a627b0c000000b0061de8bb1cb0mr4606904pfc.1.1678390191176; Thu, 09 Mar 2023 11:29:51 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:50 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 65/82] scsi: ppa: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:57 -0800 Message-Id: <20230309192614.2240602-66-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/ppa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index c6c1bc608224..909c49541984 100644 --- a/drivers/scsi/ppa.c +++ b/drivers/scsi/ppa.c @@ -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, From patchwork Thu Mar 9 19:25:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4301BC61DA4 for ; Thu, 9 Mar 2023 19:31:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbjCITbj (ORCPT ); Thu, 9 Mar 2023 14:31:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbjCITao (ORCPT ); Thu, 9 Mar 2023 14:30:44 -0500 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD3E1FC7F7 for ; Thu, 9 Mar 2023 11:29:54 -0800 (PST) Received: by mail-pl1-f178.google.com with SMTP id n6so3120612plf.5 for ; Thu, 09 Mar 2023 11:29:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xct695NTdKunJwZpBlsAMpxZPmRVUZn+AcEa7DsrRUQ=; b=YCgPRdxMA1AnrgFCi+IzajUolaBiqXrS3PUkgec16ruNTX6goGhKy0zyyQz/LanWGI JzS4Dh1bty25qsxTvA1GD8IF/g54LtsFfQjI0IaBxHNQ4DMhwKwIGH6j8uLsUCTA5RRF UQh796pJEsj1Bi/vX/+9/Zg8ayBYuq0Qz/lYM+NfZbIoq92HyP0Ber7MnqnvuzcgyXqH Km1wef+5agbH+cxzQtDIG6dRL1NFPDEf9dd+ETV354/hqR1TEkmyqxI4XYTnbTzsbI8X chdGxKQxMkEFDOT79wHj1JtaJG4fTrYvbncuK/vNxQkCnNhBGhoLTrjQZl4a84zrNU5C OcfA== X-Gm-Message-State: AO0yUKVFRzSefZz7KrCdPjwZ1JFacBy3i6adMEORIzIbUib5PdF1MJEH 5/z+bSTfOSWBUc2/6NLJ9yo= X-Google-Smtp-Source: AK7set+sPR1u98txrByEUci1KeG7GLp+QSMAyVzJg0tTbyw6nHbC0SL/uNuYBDeMd/eXBSsmb0Mnuw== X-Received: by 2002:a05:6a20:d49b:b0:c7:5cd8:f851 with SMTP id im27-20020a056a20d49b00b000c75cd8f851mr21948849pzb.51.1678390194328; Thu, 09 Mar 2023 11:29:54 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:53 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 67/82] scsi: qla1280: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:25:59 -0800 Message-Id: <20230309192614.2240602-68-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 1e7f4d138e06..6e5e89aaa283 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -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", From patchwork Thu Mar 9 19:26:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CFD8C6FD19 for ; Thu, 9 Mar 2023 19:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbjCITb5 (ORCPT ); Thu, 9 Mar 2023 14:31:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbjCITax (ORCPT ); Thu, 9 Mar 2023 14:30:53 -0500 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 346FAF146E for ; Thu, 9 Mar 2023 11:29:58 -0800 (PST) Received: by mail-pl1-f173.google.com with SMTP id i3so3111702plg.6 for ; Thu, 09 Mar 2023 11:29:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390198; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2E38+Z4Kj94CPrSnz/WfZRtH1QTTtivsr8lXuwNctz8=; b=j44sFl6Hq3xdW8DSHiJ/bBNdyfrp6SgX8V8TBntu/rtx0dQi+3UW8jqssVfyIyU/dj K9JoPTFB27iDLt9IvfS680TKWNfrXQpo7zexP0Xa/qwQ5vhbHyu5mK6/F3K0InsFhZ34 R9X+M0+eQNpjKWXBIo6VJRKQq1EGFTVJ2NCUcTuRHD2Jhhp7pbc/q6qMfKjuRR1QRUNt psrWOq0F4W97L3njjyAcPSJnR+4pxq9BnDyxAAeRef56IIr11/4KPv9wf/vgy8pb9ixD yTGzVUSpmn6ouBco9vEBkfw+5RhHLBVYn8rn+zI5LRFrh8EvUrOPhQCL8ZZuuGngvUYU n7rg== X-Gm-Message-State: AO0yUKW/Krt240OisY/au9pHNItLIP4ie2KQ9Ww+JjlTe6yOhcCzC0WS 5JG9D1m9p8DkQQ9H6PkSF+A= X-Google-Smtp-Source: AK7set+AMfYT9rpzNwJ6iR7x0MOz1+IfcNwYu/K39ZorbdOHnye3O49CsqPmD2fqY07FK4XCKRkIhQ== X-Received: by 2002:a05:6a20:12d1:b0:cd:fc47:ddbf with SMTP id v17-20020a056a2012d100b000cdfc47ddbfmr25150792pzg.47.1678390197723; Thu, 09 Mar 2023 11:29:57 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:57 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 69/82] scsi: qlogicpti: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:26:01 -0800 Message-Id: <20230309192614.2240602-70-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/qlogicpti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 8c961ff03fcd..6fa8c78c3116 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -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, From patchwork Thu Mar 9 19:26:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDC3FC64EC4 for ; Thu, 9 Mar 2023 19:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbjCITbp (ORCPT ); Thu, 9 Mar 2023 14:31:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230171AbjCITay (ORCPT ); Thu, 9 Mar 2023 14:30:54 -0500 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 054D662D9F for ; Thu, 9 Mar 2023 11:29:59 -0800 (PST) Received: by mail-pg1-f181.google.com with SMTP id d10so1700865pgt.12 for ; Thu, 09 Mar 2023 11:29:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390199; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zmH/5IDY29elfLiT8SdhUeTtrZ6olPcPm8Il5WJPzag=; b=3jnPiayuKJ2axU1CsruSNAjE7ZQmWZ7RcpedWP7nrtKK/dugx8iqfX7kF6Uf+pkfmX K7x36mmLMv4DXBbHb3Pdz1RqX0dTfN+N5/l/J0wqbbDSArScy5VIOgJLwTfVCEkfPr27 hSo+Od5/xXfk6cPACu5uNEkmeKWCwQ6MFieZHaDWODKVLROwpAC6Zcys/KEtnJhcwdoU AdKdpQhBa2Y5NXT+O8+DS9Cu/vTyGL8PX7ghP2pHNgqoO4YXlZoouC1UgbEEif37CC9Q iZvjMzu7ZC/8vCSDEHFUY5myzXXI4eVooYLjczwEunElHzk31PmS26qbPWVtZGbs8q0K 7Xsw== X-Gm-Message-State: AO0yUKWGOB6t6pbOHWF/205Iz9tHqSWhjYucgUkz1GPEwRQ9AGaM36Yp C/b/1N0euJxadIwPS1RK/v4= X-Google-Smtp-Source: AK7set8lMicPMHIH5Axscm64BIvpF7nGdsIGod+bIC9qfdY9HY/hEeJpSPSZUOCAcqBCqDTfn6f0FA== X-Received: by 2002:a62:1bd2:0:b0:5a9:b6f4:778a with SMTP id b201-20020a621bd2000000b005a9b6f4778amr20774978pfb.24.1678390199437; Thu, 09 Mar 2023 11:29:59 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:29:58 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 70/82] scsi: sgiwd93: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:26:02 -0800 Message-Id: <20230309192614.2240602-71-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/sgiwd93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c index 57d5dff62f63..88e2b5eb9caa 100644 --- a/drivers/scsi/sgiwd93.c +++ b/drivers/scsi/sgiwd93.c @@ -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", From patchwork Thu Mar 9 19:26:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4096C64EC4 for ; Thu, 9 Mar 2023 19:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbjCITby (ORCPT ); Thu, 9 Mar 2023 14:31:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229893AbjCITbD (ORCPT ); Thu, 9 Mar 2023 14:31:03 -0500 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C0D8F1447 for ; Thu, 9 Mar 2023 11:30:03 -0800 (PST) Received: by mail-pj1-f48.google.com with SMTP id q31-20020a17090a17a200b0023750b69614so2908605pja.5 for ; Thu, 09 Mar 2023 11:30:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390203; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x8zmmOkwIoIKAWyiwthdityD4hZhxjndZB0ZAklYRAQ=; b=VSNRwa4GMTmYyhPlTJS7IneNUHA121yORDLAAH2zewVDKOCvyL5rzOK+9M9dz2/tZV id6+Bz9jQfcCARXWeVtjKaElKVTYMN6fSWosswq24jnDzAaUOPN322l8woTQxu2T8RRF Vo0t0IFCUaRHTXIKXuK59j95rjSYy16ffAMEJjGbzi+P/mkINwHqoS54+QGbEv/YSq1R MWMykNLwvGlxWRwrSFpifr8Meun93iy/mWVBlR0eM1au33TGr2aNHI2i5AtdLqsmKRCI SiPZlQeaMm2WYdxEniDyXkJDif4ATIrZhS71wLLhQxFqyVHb0VHbEWcsO1js0mstdEtS Mccg== X-Gm-Message-State: AO0yUKU1yCM+DM/Kuk7E5t8tsJViYW7tqG8T0Ym5Bti80PEgaL5ABcV7 u9iQCMKDn5l7GsbogRJrWOmXFq908hf0FQ== X-Google-Smtp-Source: AK7set9ZMkVPz5fvUU1iy6Sl6whnlic4wd7Ni907+WBaeBcWHXNXkM/lju8/HjaYsUu3tF+nsofvxA== X-Received: by 2002:a05:6a20:548a:b0:cc:d891:b2b1 with SMTP id i10-20020a056a20548a00b000ccd891b2b1mr29840631pzk.35.1678390203001; Thu, 09 Mar 2023 11:30:03 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:30:02 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Karan Tilak Kumar , Sesidhar Baddela , "James E.J. Bottomley" Subject: [PATCH v2 72/82] scsi: snic: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:26:04 -0800 Message-Id: <20230309192614.2240602-73-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/snic/snic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c index 174f7811fe50..cc824dcfe7da 100644 --- a/drivers/scsi/snic/snic_main.c +++ b/drivers/scsi/snic/snic_main.c @@ -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, From patchwork Thu Mar 9 19:26:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42C17C64EC4 for ; Thu, 9 Mar 2023 19:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbjCITbs (ORCPT ); Thu, 9 Mar 2023 14:31:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbjCITbF (ORCPT ); Thu, 9 Mar 2023 14:31:05 -0500 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88C1DFCF04 for ; Thu, 9 Mar 2023 11:30:08 -0800 (PST) Received: by mail-pf1-f172.google.com with SMTP id y10so2196420pfi.8 for ; Thu, 09 Mar 2023 11:30:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390208; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xqqv+aHKme2XMo/FdJ5muGw9JOXNAt4DfJWK98zODgU=; b=cjs6QykkQx3mf0vKn70ffgiMVKQL32pa56GOiw6kvVYUYD8uC5xmgRiPOLVvLwyCs+ heFpgejYwyKqyj/HruFG+ofkZjsQEStLOGhWG6MD+owInyQsZDLsE4x8sbsTFZUDB/9c q7+50GQ5D94wCi1gbb8iCSci0YeQxGdFKSNWoePbXJkurtH4CAjJ6bQodNZonVRpyVLn PY6rR5E9BMyKRFuJefVeDagEoERnJUx/GJHYolMhsR8a/gCo9XSnonpc/NaNaP4axg29 2z3HaaRx0BpeGFAyRVGx5o6PM8jetCeRUI1hbIgl1+uLZ+i4A1brKFr4E9c00sCC+Des mtAQ== X-Gm-Message-State: AO0yUKWqIOmgUzKyDAtKyeErlZWXLRecjYcAn2nNBA4TGfG9UsDXesC4 TFYDrsnbrjWTjF4EBqNHtbuLlKAt5dIz9w== X-Google-Smtp-Source: AK7set+zUvTE98OE5YK63qcW762ZSlzdocTAJwax0PgMv1hDUwO1HlPD1XbjDXzBhAA08SVNh2mgdQ== X-Received: by 2002:a62:8497:0:b0:5a8:d3d9:e03a with SMTP id k145-20020a628497000000b005a8d3d9e03amr27339587pfd.0.1678390208173; Thu, 09 Mar 2023 11:30:08 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:30:07 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "Michael S. Tsirkin" , Jason Wang , "James E.J. Bottomley" Subject: [PATCH v2 75/82] scsi: virtio-scsi: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:26:07 -0800 Message-Id: <20230309192614.2240602-76-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/virtio_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index c5558c45ab3a..58498da9869a 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -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", From patchwork Thu Mar 9 19:26:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CDD9C6FD19 for ; Thu, 9 Mar 2023 19:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230301AbjCITbv (ORCPT ); Thu, 9 Mar 2023 14:31:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbjCITbS (ORCPT ); Thu, 9 Mar 2023 14:31:18 -0500 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 261F2FCF15 for ; Thu, 9 Mar 2023 11:30:11 -0800 (PST) Received: by mail-pl1-f171.google.com with SMTP id v11so3098794plz.8 for ; Thu, 09 Mar 2023 11:30:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390210; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iHexfxqhHa9lPmHb4Wa8nZQ2WhbsAHB+F6q2CfoJf+4=; b=hf8kJNchKKAa3RtkWUdNJE6BxSaSP1/DvRxJ4LlLKY5CYMLdIf5NgJESXQCMlyD6k1 fm8D5bg0258+2KzIlHYqxok1FBYEF2xw0qtJzKnLlZp8tZ8arPbbojijKIhiRvkuyVXh YV/gHezTzs+vaai18ljYxRsR8OZNmJPEsvwsQI7K2OBcwXQr2P6hIfie9rKxea7StTBc PDqH4OKeDEeDdzE3nTy5Cjilir/znqLYkRT3iuo0qdYJjh1qZs+NpHJsBtS0Q4jxdd+J HCM+e+NrCtN/jKbGqZ8RC27yYns4HCkP+ccHS75kDzHzf7uz7XSMZTAVMojGZjGVXvfD UMzw== X-Gm-Message-State: AO0yUKVA+iAr3VJaJTmu8X8p+XfkPGg2Zv9jnbXC4JVVEUrecX7Xw6GX C959jPqF1Lwlb//SJYwQcZQ4GG6LMtUo8g== X-Google-Smtp-Source: AK7set8vJg0MioWMPDvAekq7/1cFVz5gDt6fcJD3JTgObz88LImQrTai1FID2ugLfTyOQLldXHYarQ== X-Received: by 2002:a05:6a21:33a2:b0:cd:97f3:25e1 with SMTP id yy34-20020a056a2133a200b000cd97f325e1mr30322840pzb.51.1678390210582; Thu, 09 Mar 2023 11:30:10 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:30:09 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , "James E.J. Bottomley" Subject: [PATCH v2 76/82] scsi: wd719x: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:26:08 -0800 Message-Id: <20230309192614.2240602-77-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/scsi/wd719x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index ff1b22077251..5a380eecfc75 100644 --- a/drivers/scsi/wd719x.c +++ b/drivers/scsi/wd719x.c @@ -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), From patchwork Thu Mar 9 19:26:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661482 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C607AC64EC4 for ; Thu, 9 Mar 2023 19:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230476AbjCITcZ (ORCPT ); Thu, 9 Mar 2023 14:32:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbjCITbj (ORCPT ); Thu, 9 Mar 2023 14:31:39 -0500 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BF70FCF92 for ; Thu, 9 Mar 2023 11:30:30 -0800 (PST) Received: by mail-pf1-f170.google.com with SMTP id cp12so2202459pfb.5 for ; Thu, 09 Mar 2023 11:30:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390229; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7GTKZi+0YaNTIlpwS+iAgVwMbfw4PFSVQQ5YHhFSUO0=; b=Vn3r2ZCRVqa2f0yCoJRAFDa/jLLjqadrg5H6F7ujbYXVQznWDQvxDAW6CSWzMNtBfu FJJXA2nvAAmhZcG2JWxdKewKD/Zckd6nJmI5SNO2ldC8wHiHXcCO36QjDfF9+xZCVQ4D EJH1agOqwWgQuutA4xIMDY1bxr3Ixzkducxxtduz0sv0wZuXca4d1nk0GhBPu3JHf9CD zltKdBYBmjpuqg6JRDSb84Z49mSn3AzdCSb8qj1v4W8stvoep8EpmiY4PhRVC7tHnwBE B0QSMCK0iDY7XBMuT4482rZyw0OaalhBvdzuUvQ+DhfG8yvCM/w3Bu42dYYyh1eGHMO3 ErJw== X-Gm-Message-State: AO0yUKXC8vzdOkS78HX1OpYMKAEvFB2Qj227lCOR9fMYNhtHbS/6Djjt Gd+fOZDkOSWXv4BRI1XHg/8= X-Google-Smtp-Source: AK7set/Zvh8kaBzxsRfHXsSBpKf/0wQMESSwe4EXTiyNmf0xp6f5zkQMruFebEig9mvTm20pi5z7Sw== X-Received: by 2002:a62:7b0c:0:b0:61d:e8bb:1cb0 with SMTP id w12-20020a627b0c000000b0061de8bb1cb0mr4608594pfc.1.1678390229654; Thu, 09 Mar 2023 11:30:29 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:30:29 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Mike Christie , Yang Yingliang Subject: [PATCH v2 79/82] scsi: target: tcm-loop: Declare SCSI host template const Date: Thu, 9 Mar 2023 11:26:11 -0800 Message-Id: <20230309192614.2240602-80-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Make it explicit that the SCSI host template is not modified. Signed-off-by: Bart Van Assche --- drivers/target/loopback/tcm_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 139031ccb700..e5f029b296e4 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -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", From patchwork Thu Mar 9 19:26:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 661481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D5CBC74A44 for ; Thu, 9 Mar 2023 19:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230375AbjCITck (ORCPT ); Thu, 9 Mar 2023 14:32:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231189AbjCITbn (ORCPT ); Thu, 9 Mar 2023 14:31:43 -0500 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7298F2490; Thu, 9 Mar 2023 11:30:43 -0800 (PST) Received: by mail-pj1-f51.google.com with SMTP id nn12so3049379pjb.5; Thu, 09 Mar 2023 11:30:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678390243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xfmqVM4eCIFK7WXM5T4rNwixxG5P/UyTiF6WzsxcG08=; b=B8vnTBO8gMoMXsWghA9kIJthIJ7VRt0WiQ1L7nPT3ngvrsNfzFO6QrIt3XVaIDjXfk S5YpfC3M0gdM9wjG1/4Vh72UfUXDX4SE6GUxqi9u7pwDr5etNn0N2xFY318BjdqUhxJI hqiEJheTsXhSDn6/4MfwdMaL2EFTkxwnJ/sBoFN+wYnPwjZCtTe566FTWqOLr6wq3ryb xc3v23NcN37UYXbmJqclo7G5hyCI5+E/0ZLLY3Hmz/zegz7FM4uB5BuYZ2nQ51MrUyO5 7cdh5IE7tpvlUo/0HTrVdgbO+BTqr5owbMSG2rkfKJEEnIwfvPT8rhEYA3DqVYR4QodO 8zzA== X-Gm-Message-State: AO0yUKWUCIlphZa2nFJ1zuRI5ZVgZoAqmKEoU5kN4WFLjhADj5p/H9dZ /IgKzAyWE7x8XL8nmlId+rE= X-Google-Smtp-Source: AK7set8DTiSNS/I3M7y7cFxIRLb/uyeoVyw4BORClXCz53YnaxZ86rAG0NayiDa3/KphtIvvw3Taog== X-Received: by 2002:a05:6a20:6925:b0:bc:e785:5ad3 with SMTP id q37-20020a056a20692500b000bce7855ad3mr18843765pzj.29.1678390243469; Thu, 09 Mar 2023 11:30:43 -0800 (PST) Received: from bvanassche-linux.mtv.corp.google.com ([2620:15c:211:201:bf9f:35c8:4915:cb24]) by smtp.gmail.com with ESMTPSA id j24-20020a62b618000000b0058d8f23af26sm11570955pff.157.2023.03.09.11.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 11:30:42 -0800 (PST) From: Bart Van Assche To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Alan Stern , Oliver Neukum , linux-usb@vger.kernel.org, Oliver Neukum , Greg Kroah-Hartman Subject: [PATCH v2 81/82] usb: uas: Declare two host templates and host template pointers const Date: Thu, 9 Mar 2023 11:26:13 -0800 Message-Id: <20230309192614.2240602-82-bvanassche@acm.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230309192614.2240602-1-bvanassche@acm.org> References: <20230309192614.2240602-1-bvanassche@acm.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Improve source code documentation by constifying host templates that are not modified. Acked-by: Alan Stern (for usb-storage) Acked-by: Oliver Neukum Cc: Oliver Neukum Cc: linux-usb@vger.kernel.org Signed-off-by: Bart Van Assche --- 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(-) diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index 874ea4b54ced..8c8fa71c69c4 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -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", diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index de3836412bf3..2583ee9815c5 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -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, diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index ed7c6ad96a74..7b36a3334fb3 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -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; diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 0451fac1adce..fd3f32670873 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h @@ -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);