Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699447 > unrolled thread

[PATCH 11/29] scsi: 3w-sas: constify pci_device_id.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-07-30 10:50 +0200
Last post2017-07-30 10:50 +0200
Articles 8 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 11/29] scsi: 3w-sas: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 16/29] scsi: esas2r: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 19/29] scsi: megaraid: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 12/29] scsi: hptiop: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 13/29] scsi: fdomain: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 15/29] scsi: sym53c8xx_2: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 18/29] scsi: dmx3191d: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 14/29] scsi: snic: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200

#1699447 — [PATCH 11/29] scsi: 3w-sas: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 11/29] scsi: 3w-sas: constify pci_device_id.
Message-ID<u8S5b-6pl-3@gated-at.bofh.it>
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/scsi/3w-sas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c
index b150e13..e771e86 100644
--- a/drivers/scsi/3w-sas.c
+++ b/drivers/scsi/3w-sas.c
@@ -1847,7 +1847,7 @@ static int twl_resume(struct pci_dev *pdev)
 #endif
 
 /* PCI Devices supported by this driver */
-static struct pci_device_id twl_pci_tbl[] = {
+static const struct pci_device_id twl_pci_tbl[] = {
 	{ PCI_VDEVICE(3WARE, PCI_DEVICE_ID_3WARE_9750) },
 	{ }
 };
-- 
2.7.4

[toc] | [next] | [standalone]


#1699448 — [PATCH 16/29] scsi: esas2r: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 16/29] scsi: esas2r: constify pci_device_id.
Message-ID<u8S5c-6pl-15@gated-at.bofh.it>
In reply to#1699447
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 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 f2e9d8a..81f226b 100644
--- a/drivers/scsi/esas2r/esas2r_main.c
+++ b/drivers/scsi/esas2r/esas2r_main.c
@@ -309,7 +309,7 @@ MODULE_PARM_DESC(interrupt_mode,
 		 "Defines the interrupt mode to use.  0 for legacy"
 		 ", 1 for MSI.  Default is MSI (1).");
 
-static struct pci_device_id
+static const struct pci_device_id
 	esas2r_pci_table[] = {
 	{ ATTO_VENDOR_ID, 0x0049,	  ATTO_VENDOR_ID, 0x0049,
 	  0,
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1699449 — [PATCH 19/29] scsi: megaraid: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 19/29] scsi: megaraid: constify pci_device_id.
Message-ID<u8S5c-6pl-19@gated-at.bofh.it>
In reply to#1699447
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/scsi/megaraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 3c63c29..17012c8 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4652,7 +4652,7 @@ megaraid_shutdown(struct pci_dev *pdev)
 	__megaraid_shutdown(adapter);
 }
 
-static struct pci_device_id megaraid_pci_tbl[] = {
+static const struct pci_device_id megaraid_pci_tbl[] = {
 	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID,
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID2,
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1699450 — [PATCH 12/29] scsi: hptiop: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 12/29] scsi: hptiop: constify pci_device_id.
Message-ID<u8S5c-6pl-17@gated-at.bofh.it>
In reply to#1699447
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 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 7226226..31415b8 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -1647,7 +1647,7 @@ static struct hptiop_adapter_ops hptiop_mvfrey_ops = {
 	.host_phy_flag     = cpu_to_le64(1),
 };
 
-static struct pci_device_id hptiop_id_table[] = {
+static const struct pci_device_id hptiop_id_table[] = {
 	{ PCI_VDEVICE(TTI, 0x3220), (kernel_ulong_t)&hptiop_itl_ops },
 	{ PCI_VDEVICE(TTI, 0x3320), (kernel_ulong_t)&hptiop_itl_ops },
 	{ PCI_VDEVICE(TTI, 0x3410), (kernel_ulong_t)&hptiop_itl_ops },
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1699451 — [PATCH 13/29] scsi: fdomain: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 13/29] scsi: fdomain: constify pci_device_id.
Message-ID<u8S5c-6pl-23@gated-at.bofh.it>
In reply to#1699447
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/scsi/fdomain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
index b87ab38..d46cbe8 100644
--- a/drivers/scsi/fdomain.c
+++ b/drivers/scsi/fdomain.c
@@ -1770,7 +1770,7 @@ struct scsi_host_template fdomain_driver_template = {
 #ifndef PCMCIA
 #if defined(CONFIG_PCI) && defined(MODULE)
 
-static struct pci_device_id fdomain_pci_tbl[] = {
+static const struct pci_device_id fdomain_pci_tbl[] = {
 	{ PCI_VENDOR_ID_FD, PCI_DEVICE_ID_FD_36C70,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ }
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1699456 — [PATCH 15/29] scsi: sym53c8xx_2: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 15/29] scsi: sym53c8xx_2: constify pci_device_id.
Message-ID<u8S5d-6pl-33@gated-at.bofh.it>
In reply to#1699447
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index d32e3ba..6934265 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -2000,7 +2000,7 @@ static struct spi_function_template sym2_transport_functions = {
 	.get_signalling	= sym2_get_signalling,
 };
 
-static struct pci_device_id sym2_id_table[] = {
+static const struct pci_device_id sym2_id_table[] = {
 	{ PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C810,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_NCR_53C820,
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1699457 — [PATCH 18/29] scsi: dmx3191d: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 18/29] scsi: dmx3191d: constify pci_device_id.
Message-ID<u8S5d-6pl-31@gated-at.bofh.it>
In reply to#1699447
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 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 6af3394..805ae59 100644
--- a/drivers/scsi/dmx3191d.c
+++ b/drivers/scsi/dmx3191d.c
@@ -139,7 +139,7 @@ static void dmx3191d_remove_one(struct pci_dev *pdev)
 	pci_disable_device(pdev);
 }
 
-static struct pci_device_id dmx3191d_pci_tbl[] = {
+static const struct pci_device_id dmx3191d_pci_tbl[] = {
 	{PCI_VENDOR_ID_DOMEX, PCI_DEVICE_ID_DOMEX_DMX3191D,
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
 	{ }
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1699460 — [PATCH 14/29] scsi: snic: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 14/29] scsi: snic: constify pci_device_id.
Message-ID<u8S5d-6pl-39@gated-at.bofh.it>
In reply to#1699447
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 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 7cf70aa..74031e4 100644
--- a/drivers/scsi/snic/snic_main.c
+++ b/drivers/scsi/snic/snic_main.c
@@ -35,7 +35,7 @@
 #define PCI_DEVICE_ID_CISCO_SNIC	0x0046
 
 /* Supported devices by snic module */
-static struct pci_device_id snic_id_table[] = {
+static const struct pci_device_id snic_id_table[] = {
 	{PCI_DEVICE(0x1137, PCI_DEVICE_ID_CISCO_SNIC) },
 	{ 0, }	/* end of table */
 };
-- 
2.7.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web