perf/x86/intel/uncore: Remove use of macro DEFINE_PCI_DEVICE_TABLE
Subsystems (2)
PATCH 1/1 perf/x86/intel/uncore: Remove use of macro DEFINE_PCI_DEVICE_TABLE
Macro DEFINE_PCI_DEVICE_TABLE is deprecated. So, here use struct pci_device_id instead of DEFINE_PCI_DEVICE_TABLE with the goal of getting rid of this macro completely.
The Coccinelle semantic patch that performs this transformation is as follows:
@@
identifier a;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer i;
@@
- DEFINE_PCI_DEVICE_TABLE(a)
+ const struct pci_device_id a[]
= i;
--- arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c +1 -1
@@ -2215,7 +2215,7 @@ static struct intel_uncore_type *hswep_pci_uncores[] = { NULL, }; -static DEFINE_PCI_DEVICE_TABLE (hswep_uncore_pci_ids) = { +static const struct pci_device_id hswep_uncore_pci_ids[] = { {/* Home Agent 0 */ PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x2f30 ), .driver_data =UNCORE_PCI_DEV_DATA (HSWEP_PCI_UNCORE_HA ,0 ),
Signature · 1 line
1.9.1
tip-bot for Vaishali Thakkar
merge bot[tip:perf/core] perf/x86/intel/uncore: Remove use of macro DEFINE_PCI_DEVICE_TABLE()
perf/x86/intel/uncore: Remove use of macro DEFINE_PCI_DEVICE_TABLE()
Commit-ID: 070a7cdfa4a0a799235d79e58e7b0b2d94dff190 Gitweb: http://git.kernel.org/tip/070a7cdfa4a0a799235d79e58e7b0b2d94dff190 Author: Vaishali Thakkar <[email protected]> AuthorDate: Fri, 17 Jul 2015 10:57:59 +0530 Committer: Ingo Molnar <[email protected]> CommitDate: Tue, 4 Aug 2015 10:16:52 +0200
perf/x86/intel/uncore: Remove use of macro DEFINE_PCI_DEVICE_TABLE()
The DEFINE_PCI_DEVICE_TABLE() macro is deprecated. Use 'struct pci_device_id' instead of DEFINE_PCI_DEVICE_TABLE(), with the goal of getting rid of this macro completely.
This Coccinelle semantic patch performs this transformation:
@@
identifier a;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer i;
@@
- DEFINE_PCI_DEVICE_TABLE(a)
+ const struct pci_device_id a[] = i;
--- arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c +1 -1
@@ -2215,7 +2215,7 @@ static struct intel_uncore_type *hswep_pci_uncores[] = { NULL, }; -static DEFINE_PCI_DEVICE_TABLE (hswep_uncore_pci_ids) = { +static const struct pci_device_id hswep_uncore_pci_ids[] = { {/* Home Agent 0 */ PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x2f30 ), .driver_data =UNCORE_PCI_DEV_DATA (HSWEP_PCI_UNCORE_HA ,0 ),
Ping!
Quoted 37 lines · Vaishali Thakkar
Macro
DEFINE_PCI_DEVICE_TABLEis deprecated. So, here use structpci_device_idinstead ofDEFINE_PCI_DEVICE_TABLEwith the goal of getting rid of this macro completely.The Coccinelle semantic patch that performs this transformation is as follows:
@@
identifier a;
declarer nameDEFINE_PCI_DEVICE_TABLE;
initializer i;
@@
-DEFINE_PCI_DEVICE_TABLE(a)
+ const structpci_device_ida[]
= i;Signed-off-by Vaishali Thakkar <[email protected]>--- arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c +1
-2@@ -2215,7 +2215,7 @@ static struct intel_uncore_type *hswep_pci_uncores[] = { NULL, }; -static DEFINE_PCI_DEVICE_TABLE (hswep_uncore_pci_ids) = { +static const struct pci_device_id hswep_uncore_pci_ids[] = { {/* Home Agent 0 */ PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x2f30 ), .driver_data =UNCORE_PCI_DEV_DATA (HSWEP_PCI_UNCORE_HA ,0 ), --1.9.1
Signature · 1 line
Vaishali
Quoted 1 line · Vaishali Thakkar
Ping!
Pong. This patch is already upstream.
Thanks,
Ingo
Quoted 6 lines · Ingo Molnar
Quoted 1 line · Vaishali Thakkar
Ping!
Pong. This patch is already upstream.
Oops! Sorry. I just realized that you already applied it but it is still showing me in linux-next
when grepped for it and is blocking the road in removing the macro definition.
Sorry for the noise.
Quoted 3 lines
Thanks,
Ingo
Signature · 1 line
Vaishali
Quoted 11 lines · Vaishali Thakkar
Quoted 6 lines · Ingo Molnar
Quoted 1 line · Vaishali Thakkar
Ping!
Pong. This patch is already upstream.
Oops! Sorry. I just realized that you already applied it but it is still showing me in linux-next
when grepped for it and is blocking the road in removing the macro definition.
So I think what you saw in linux-next is another usage of the old macro, in the same file - which usage arrived since you did the first patch.
Quoted 2 lines
Sorry for the noise.
np.
Thanks,
Ingo
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · Vaishali Thakkar
Quoted 5 lines · Ingo Molnar
Quoted 1 line · Vaishali Thakkar
Ping!
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Pong. This patch is already upstream.
Oops! Sorry. I just realized that you already applied it but it is still showing me in linux-next
when grepped for it and is blocking the road in removing the macro definition.So I think what you saw in linux-next is another usage of the old macro, in the same file - which usage arrived since you did the first patch.
Ah, yes. That's why I was confused. Thanks.
Let me send a patch for that.
Quoted 8 lines
Quoted 2 lines
Sorry for the noise.
np.
Thanks,
Ingo
Signature · 1 line
Vaishali