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


Groups > linux.kernel > #1699454 > unrolled thread

[PATCH 21/29] scsi: nsp32: 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 6 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 21/29] scsi: nsp32: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 26/29] scsi: a100u2w: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 29/29] scsi: 3w-xxxx: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 22/29] scsi: pmcraid: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 25/29] scsi: megaraid: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200
    [PATCH 27/29] scsi: advansys: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-30 10:50 +0200

#1699454 — [PATCH 21/29] scsi: nsp32: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 21/29] scsi: nsp32: constify pci_device_id.
Message-ID<u8S5c-6pl-7@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/nsp32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 53c8477..1430b3c 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -76,7 +76,7 @@ static const char *nsp32_release_version = "1.2";
 /****************************************************************************
  * Supported hardware
  */
-static struct pci_device_id nsp32_pci_table[] = {
+static const struct pci_device_id nsp32_pci_table[] = {
 	{
 		.vendor      = PCI_VENDOR_ID_IODATA,
 		.device      = PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II,
-- 
2.7.4

[toc] | [next] | [standalone]


#1699455 — [PATCH 26/29] scsi: a100u2w: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 26/29] scsi: a100u2w: constify pci_device_id.
Message-ID<u8S5c-6pl-29@gated-at.bofh.it>
In reply to#1699454
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/a100u2w.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 8086bd0..80c39fd 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1209,7 +1209,7 @@ static void inia100_remove_one(struct pci_dev *pdev)
 	scsi_host_put(shost);
 } 
 
-static struct pci_device_id inia100_pci_tbl[] = {
+static const struct pci_device_id inia100_pci_tbl[] = {
 	{PCI_VENDOR_ID_INIT, 0x1060, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{0,}
 };
-- 
2.7.4

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


#1699458 — [PATCH 29/29] scsi: 3w-xxxx: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 29/29] scsi: 3w-xxxx: constify pci_device_id.
Message-ID<u8S5d-6pl-37@gated-at.bofh.it>
In reply to#1699454
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-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 33261b6..e0b079d 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -2384,7 +2384,7 @@ static void tw_remove(struct pci_dev *pdev)
 } /* End tw_remove() */
 
 /* PCI Devices supported by this driver */
-static struct pci_device_id tw_pci_tbl[] = {
+static const struct pci_device_id tw_pci_tbl[] = {
 	{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_1000,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{ PCI_VENDOR_ID_3WARE, PCI_DEVICE_ID_3WARE_7000,
-- 
2.7.4

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


#1699459 — [PATCH 22/29] scsi: pmcraid: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 22/29] scsi: pmcraid: constify pci_device_id.
Message-ID<u8S5d-6pl-35@gated-at.bofh.it>
In reply to#1699454
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/pmcraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 1cc814f..1a9e153 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -126,7 +126,7 @@ static struct pmcraid_chip_details pmcraid_chip_cfg[] = {
 /*
  * PCI device ids supported by pmcraid driver
  */
-static struct pci_device_id pmcraid_pci_table[] = {
+static const struct pci_device_id pmcraid_pci_table[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_PMC, PCI_DEVICE_ID_PMC_MAXRAID),
 	  0, 0, (kernel_ulong_t)&pmcraid_chip_cfg[0]
 	},
-- 
2.7.4

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


#1699461 — [PATCH 25/29] scsi: megaraid: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 25/29] scsi: megaraid: constify pci_device_id.
Message-ID<u8S5d-6pl-41@gated-at.bofh.it>
In reply to#1699454
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/megaraid_sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 316c3df..ed2acda 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -124,7 +124,7 @@ static int megasas_get_target_prop(struct megasas_instance *instance,
 /*
  * PCI ID table for all supported controllers
  */
-static struct pci_device_id megasas_pci_table[] = {
+static const struct pci_device_id megasas_pci_table[] = {
 
 	{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1064R)},
 	/* xscale IOP */
-- 
2.7.4

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


#1699462 — [PATCH 27/29] scsi: advansys: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-30 10:50 +0200
Subject[PATCH 27/29] scsi: advansys: constify pci_device_id.
Message-ID<u8S5d-6pl-43@gated-at.bofh.it>
In reply to#1699454
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/advansys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 24e57e7..350070f 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -11714,7 +11714,7 @@ static struct eisa_driver advansys_eisa_driver = {
 };
 
 /* PCI Devices supported by this driver */
-static struct pci_device_id advansys_pci_tbl[] = {
+static const struct pci_device_id advansys_pci_tbl[] = {
 	{PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A,
 	 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_ABP940,
-- 
2.7.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web