* [PATCH 0/5] constify hotplug pci_device_id
@ 2017-08-03 17:09 Arvind Yadav
2017-08-03 17:09 ` [PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id Arvind Yadav
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-03 17:09 UTC (permalink / raw)
To: bhelgaas, scott; +Cc: linux-kernel, linux-pci
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 (5):
[PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id.
[PATCH 2/5] PCI: hotplug: ibmphp: constify pci_device_id.
[PATCH 3/5] PCI: hotplug: bmphp_ebda: constify pci_device_id.
[PATCH 4/5] PCI: hotplug: cpcihp_zt5550: constify pci_device_id.
[PATCH 5/5] PCI: hotplug: cpqphp: constify pci_device_id.
drivers/pci/hotplug/cpcihp_zt5550.c | 2 +-
drivers/pci/hotplug/cpqphp_core.c | 2 +-
drivers/pci/hotplug/ibmphp_core.c | 2 +-
drivers/pci/hotplug/ibmphp_ebda.c | 2 +-
drivers/pci/hotplug/shpchp_core.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id.
2017-08-03 17:09 [PATCH 0/5] constify hotplug pci_device_id Arvind Yadav
@ 2017-08-03 17:09 ` Arvind Yadav
2017-08-03 17:09 ` [PATCH 2/5] PCI: hotplug: ibmphp: " Arvind Yadav
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-03 17:09 UTC (permalink / raw)
To: bhelgaas, scott; +Cc: linux-kernel, linux-pci
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/pci/hotplug/shpchp_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 3454dc7..7bfb87b 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -351,7 +351,7 @@ static void shpc_remove(struct pci_dev *dev)
kfree(ctrl);
}
-static struct pci_device_id shpcd_pci_tbl[] = {
+static const struct pci_device_id shpcd_pci_tbl[] = {
{PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0)},
{ /* end: all zeroes */ }
};
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] PCI: hotplug: ibmphp: constify pci_device_id.
2017-08-03 17:09 [PATCH 0/5] constify hotplug pci_device_id Arvind Yadav
2017-08-03 17:09 ` [PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id Arvind Yadav
@ 2017-08-03 17:09 ` Arvind Yadav
2017-08-03 17:09 ` [PATCH 3/5] PCI: hotplug: bmphp_ebda: " Arvind Yadav
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-03 17:09 UTC (permalink / raw)
To: bhelgaas, scott; +Cc: linux-kernel, linux-pci
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/pci/hotplug/ibmphp_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index 5efd01d..73cf846 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -852,7 +852,7 @@ static int set_bus(struct slot *slot_cur)
u8 speed;
u8 cmd = 0x0;
int retval;
- static struct pci_device_id ciobx[] = {
+ static const struct pci_device_id ciobx[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, 0x0101) },
{ },
};
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] PCI: hotplug: bmphp_ebda: constify pci_device_id.
2017-08-03 17:09 [PATCH 0/5] constify hotplug pci_device_id Arvind Yadav
2017-08-03 17:09 ` [PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id Arvind Yadav
2017-08-03 17:09 ` [PATCH 2/5] PCI: hotplug: ibmphp: " Arvind Yadav
@ 2017-08-03 17:09 ` Arvind Yadav
2017-08-03 17:09 ` [PATCH 4/5] PCI: hotplug: cpcihp_zt5550: " Arvind Yadav
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-03 17:09 UTC (permalink / raw)
To: bhelgaas, scott; +Cc: linux-kernel, linux-pci
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/pci/hotplug/ibmphp_ebda.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c
index 43e345a..a6a4dac 100644
--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -1153,7 +1153,7 @@ void ibmphp_free_ebda_pci_rsrc_queue(void)
}
}
-static struct pci_device_id id_table[] = {
+static const struct pci_device_id id_table[] = {
{
.vendor = PCI_VENDOR_ID_IBM,
.device = HPC_DEVICE_ID,
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] PCI: hotplug: cpcihp_zt5550: constify pci_device_id.
2017-08-03 17:09 [PATCH 0/5] constify hotplug pci_device_id Arvind Yadav
` (2 preceding siblings ...)
2017-08-03 17:09 ` [PATCH 3/5] PCI: hotplug: bmphp_ebda: " Arvind Yadav
@ 2017-08-03 17:09 ` Arvind Yadav
2017-08-03 17:09 ` [PATCH 5/5] PCI: hotplug: cpqphp: " Arvind Yadav
2017-08-03 22:57 ` [PATCH 0/5] constify hotplug pci_device_id Bjorn Helgaas
5 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-03 17:09 UTC (permalink / raw)
To: bhelgaas, scott; +Cc: linux-kernel, linux-pci
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/pci/hotplug/cpcihp_zt5550.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
index 5f49c3f..2f8659a 100644
--- a/drivers/pci/hotplug/cpcihp_zt5550.c
+++ b/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -280,7 +280,7 @@ static void zt5550_hc_remove_one(struct pci_dev *pdev)
}
-static struct pci_device_id zt5550_hc_pci_tbl[] = {
+static const struct pci_device_id zt5550_hc_pci_tbl[] = {
{ PCI_VENDOR_ID_ZIATECH, PCI_DEVICE_ID_ZIATECH_5550_HC, PCI_ANY_ID, PCI_ANY_ID, },
{ 0, }
};
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] PCI: hotplug: cpqphp: constify pci_device_id.
2017-08-03 17:09 [PATCH 0/5] constify hotplug pci_device_id Arvind Yadav
` (3 preceding siblings ...)
2017-08-03 17:09 ` [PATCH 4/5] PCI: hotplug: cpcihp_zt5550: " Arvind Yadav
@ 2017-08-03 17:09 ` Arvind Yadav
2017-08-03 22:57 ` [PATCH 0/5] constify hotplug pci_device_id Bjorn Helgaas
5 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-03 17:09 UTC (permalink / raw)
To: bhelgaas, scott; +Cc: linux-kernel, linux-pci
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/pci/hotplug/cpqphp_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 33d300d..4d06b84 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -1417,7 +1417,7 @@ static void __exit unload_cpqphpd(void)
iounmap(smbios_start);
}
-static struct pci_device_id hpcd_pci_tbl[] = {
+static const struct pci_device_id hpcd_pci_tbl[] = {
{
/* handle any PCI Hotplug controller */
.class = ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00),
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] constify hotplug pci_device_id
2017-08-03 17:09 [PATCH 0/5] constify hotplug pci_device_id Arvind Yadav
` (4 preceding siblings ...)
2017-08-03 17:09 ` [PATCH 5/5] PCI: hotplug: cpqphp: " Arvind Yadav
@ 2017-08-03 22:57 ` Bjorn Helgaas
2017-08-03 23:22 ` Bjorn Helgaas
5 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2017-08-03 22:57 UTC (permalink / raw)
To: Arvind Yadav; +Cc: bhelgaas, scott, linux-kernel, linux-pci
On Thu, Aug 03, 2017 at 10:39:11PM +0530, Arvind Yadav wrote:
> 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 (5):
> [PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id.
> [PATCH 2/5] PCI: hotplug: ibmphp: constify pci_device_id.
> [PATCH 3/5] PCI: hotplug: bmphp_ebda: constify pci_device_id.
> [PATCH 4/5] PCI: hotplug: cpcihp_zt5550: constify pci_device_id.
> [PATCH 5/5] PCI: hotplug: cpqphp: constify pci_device_id.
>
> drivers/pci/hotplug/cpcihp_zt5550.c | 2 +-
> drivers/pci/hotplug/cpqphp_core.c | 2 +-
> drivers/pci/hotplug/ibmphp_core.c | 2 +-
> drivers/pci/hotplug/ibmphp_ebda.c | 2 +-
> drivers/pci/hotplug/shpchp_core.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
Applied to pci/hotplug for v4.14, thanks!
I squashed these all into one patch since they all do the same thing and
are so trivial.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] constify hotplug pci_device_id
2017-08-03 22:57 ` [PATCH 0/5] constify hotplug pci_device_id Bjorn Helgaas
@ 2017-08-03 23:22 ` Bjorn Helgaas
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2017-08-03 23:22 UTC (permalink / raw)
To: Arvind Yadav; +Cc: bhelgaas, scott, linux-kernel, linux-pci
On Thu, Aug 03, 2017 at 05:57:49PM -0500, Bjorn Helgaas wrote:
> On Thu, Aug 03, 2017 at 10:39:11PM +0530, Arvind Yadav wrote:
> > 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 (5):
> > [PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id.
> > [PATCH 2/5] PCI: hotplug: ibmphp: constify pci_device_id.
> > [PATCH 3/5] PCI: hotplug: bmphp_ebda: constify pci_device_id.
> > [PATCH 4/5] PCI: hotplug: cpcihp_zt5550: constify pci_device_id.
> > [PATCH 5/5] PCI: hotplug: cpqphp: constify pci_device_id.
> >
> > drivers/pci/hotplug/cpcihp_zt5550.c | 2 +-
> > drivers/pci/hotplug/cpqphp_core.c | 2 +-
> > drivers/pci/hotplug/ibmphp_core.c | 2 +-
> > drivers/pci/hotplug/ibmphp_ebda.c | 2 +-
> > drivers/pci/hotplug/shpchp_core.c | 2 +-
> > 5 files changed, 5 insertions(+), 5 deletions(-)
>
> Applied to pci/hotplug for v4.14, thanks!
I moved this to pci/misc along with the other constify patches.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-08-03 23:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 17:09 [PATCH 0/5] constify hotplug pci_device_id Arvind Yadav
2017-08-03 17:09 ` [PATCH 1/5] PCI: hotplug: shpchp: constify pci_device_id Arvind Yadav
2017-08-03 17:09 ` [PATCH 2/5] PCI: hotplug: ibmphp: " Arvind Yadav
2017-08-03 17:09 ` [PATCH 3/5] PCI: hotplug: bmphp_ebda: " Arvind Yadav
2017-08-03 17:09 ` [PATCH 4/5] PCI: hotplug: cpcihp_zt5550: " Arvind Yadav
2017-08-03 17:09 ` [PATCH 5/5] PCI: hotplug: cpqphp: " Arvind Yadav
2017-08-03 22:57 ` [PATCH 0/5] constify hotplug pci_device_id Bjorn Helgaas
2017-08-03 23:22 ` Bjorn Helgaas
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.