All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] constify scsi pci_device_id.
@ 2017-08-02 17:29 Arvind Yadav
  2017-08-02 17:29 ` [PATCH 1/3] scsi: mptfusion: constify pci_device_id Arvind Yadav
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arvind Yadav @ 2017-08-02 17:29 UTC (permalink / raw)
  To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] scsi: mptfusion: constify pci_device_id.
  2017-08-02 17:29 [PATCH 0/3] constify scsi pci_device_id Arvind Yadav
@ 2017-08-02 17:29 ` Arvind Yadav
  2017-08-02 17:29 ` [PATCH 2/3] scsi: mptfc: " Arvind Yadav
  2017-08-02 17:29 ` [PATCH 3/3] scsi: mptsas: " Arvind Yadav
  2 siblings, 0 replies; 4+ messages in thread
From: Arvind Yadav @ 2017-08-02 17:29 UTC (permalink / raw)
  To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] scsi: mptfc: constify pci_device_id.
  2017-08-02 17:29 [PATCH 0/3] constify scsi pci_device_id Arvind Yadav
  2017-08-02 17:29 ` [PATCH 1/3] scsi: mptfusion: constify pci_device_id Arvind Yadav
@ 2017-08-02 17:29 ` Arvind Yadav
  2017-08-02 17:29 ` [PATCH 3/3] scsi: mptsas: " Arvind Yadav
  2 siblings, 0 replies; 4+ messages in thread
From: Arvind Yadav @ 2017-08-02 17:29 UTC (permalink / raw)
  To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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/mptfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index d065062..82cb864 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -138,7 +138,7 @@ static struct scsi_host_template mptfc_driver_template = {
  * Supported hardware
  */
 
-static struct pci_device_id mptfc_pci_table[] = {
+static const struct pci_device_id mptfc_pci_table[] = {
 	{ PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC909,
 		PCI_ANY_ID, PCI_ANY_ID },
 	{ PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC919,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] scsi: mptsas: constify pci_device_id.
  2017-08-02 17:29 [PATCH 0/3] constify scsi pci_device_id Arvind Yadav
  2017-08-02 17:29 ` [PATCH 1/3] scsi: mptfusion: constify pci_device_id Arvind Yadav
  2017-08-02 17:29 ` [PATCH 2/3] scsi: mptfc: " Arvind Yadav
@ 2017-08-02 17:29 ` Arvind Yadav
  2 siblings, 0 replies; 4+ messages in thread
From: Arvind Yadav @ 2017-08-02 17:29 UTC (permalink / raw)
  To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-02 17:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-02 17:29 [PATCH 0/3] constify scsi pci_device_id Arvind Yadav
2017-08-02 17:29 ` [PATCH 1/3] scsi: mptfusion: constify pci_device_id Arvind Yadav
2017-08-02 17:29 ` [PATCH 2/3] scsi: mptfc: " Arvind Yadav
2017-08-02 17:29 ` [PATCH 3/3] scsi: mptsas: " Arvind Yadav

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.