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


Groups > linux.kernel > #1702312 > unrolled thread

[PATCH 0/3] constify scsi pci_device_id.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-02 19:30 +0200
Last post2017-08-02 19:30 +0200
Articles 3 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/3] constify scsi pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-02 19:30 +0200
    [PATCH 3/3] scsi: mptsas: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-02 19:30 +0200
    [PATCH 1/3] scsi: mptfusion: constify pci_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-02 19:30 +0200

#1702312 — [PATCH 0/3] constify scsi pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-02 19:30 +0200
Subject[PATCH 0/3] constify scsi pci_device_id.
Message-ID<ua5D4-4rG-5@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.

Arvind Yadav (3):
  [PATCH 1/3] scsi: mptfusion: constify pci_device_id.
  [PATCH 2/3] scsi: mptfc: constify pci_device_id.
  [PATCH 3/3] scsi: mptsas: constify pci_device_id.

 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(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1702313 — [PATCH 3/3] scsi: mptsas: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-02 19:30 +0200
Subject[PATCH 3/3] scsi: mptsas: constify pci_device_id.
Message-ID<ua5D4-4rG-7@gated-at.bofh.it>
In reply to#1702312
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/message/fusion/mptsas.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index f6308ad..8604573 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -5358,7 +5358,7 @@ static void mptsas_remove(struct pci_dev *pdev)
 	mptscsih_remove(pdev);
 }
 
-static struct pci_device_id mptsas_pci_table[] = {
+static const struct pci_device_id mptsas_pci_table[] = {
 	{ PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_SAS1064,
 		PCI_ANY_ID, PCI_ANY_ID },
 	{ PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_SAS1068,
-- 
2.7.4

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


#1702314 — [PATCH 1/3] scsi: mptfusion: constify pci_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-02 19:30 +0200
Subject[PATCH 1/3] scsi: mptfusion: constify pci_device_id.
Message-ID<ua5D4-4rG-11@gated-at.bofh.it>
In reply to#1702312
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/message/fusion/mptspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 9a336a1..f9823bb 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -1243,7 +1243,7 @@ static struct spi_function_template mptspi_transport_functions = {
  * Supported hardware
  */
 
-static struct pci_device_id mptspi_pci_table[] = {
+static const struct pci_device_id mptspi_pci_table[] = {
 	{ PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVID_53C1030,
 		PCI_ANY_ID, PCI_ANY_ID },
 	{ PCI_VENDOR_ID_ATTO, MPI_MANUFACTPAGE_DEVID_53C1030,
-- 
2.7.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web