diff mbox

[38/39] PCI: remove DEFINE_PCI_DEVICE_TABLE macro

Message ID 003b01ceefb6$bca43ed0$35ecbc70$%han@samsung.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jingoo Han Dec. 2, 2013, 11:32 p.m. UTC
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred. Also, the definition of DEFINE_PCI_DEVICE_TABLE
macro is removed.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 Documentation/PCI/pci.txt |    3 +--
 drivers/pci/ioapic.c      |    2 +-
 include/linux/pci.h       |   10 ----------
 3 files changed, 2 insertions(+), 13 deletions(-)

Comments

Joe Perches Dec. 2, 2013, 11:52 p.m. UTC | #1
On Tue, 2013-12-03 at 08:32 +0900, Jingoo Han wrote:
> Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
> is not preferred. Also, the definition of DEFINE_PCI_DEVICE_TABLE
> macro is removed.

These sorts of treewide conversions are almost never
applied wholesale.

This patch is not appropriate until there are no more
uses of DEFINE_PCI_DEVICE_TABLE in Linus' tree.

Just marking the function as deprecated in the
documentation and the pci.h file is probably good
enough for now.

see:  http://lkml.org/lkml/2013/12/2/400


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jingoo Han Dec. 3, 2013, 1:15 a.m. UTC | #2
On Tuesday, December 03, 2013 8:52 AM, Joe Perches wrote:
> On Tue, 2013-12-03 at 08:32 +0900, Jingoo Han wrote:
> > Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
> > is not preferred. Also, the definition of DEFINE_PCI_DEVICE_TABLE
> > macro is removed.
> 
> These sorts of treewide conversions are almost never
> applied wholesale.
> 
> This patch is not appropriate until there are no more
> uses of DEFINE_PCI_DEVICE_TABLE in Linus' tree.
> 
> Just marking the function as deprecated in the
> documentation and the pci.h file is probably good
> enough for now.
> 
> see:  http://lkml.org/lkml/2013/12/2/400

Actually, I want to remove all DEFINE_PCI_DEVICE_TABLEs from the
next 3.14-rc1 kernel, by merging all patches through Greg's tree.

Greg,
How about you?

Best regards,
Jingoo Han

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Greg KH Dec. 3, 2013, 1:27 a.m. UTC | #3
On Tue, Dec 03, 2013 at 10:15:06AM +0900, Jingoo Han wrote:
> On Tuesday, December 03, 2013 8:52 AM, Joe Perches wrote:
> > On Tue, 2013-12-03 at 08:32 +0900, Jingoo Han wrote:
> > > Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
> > > is not preferred. Also, the definition of DEFINE_PCI_DEVICE_TABLE
> > > macro is removed.
> > 
> > These sorts of treewide conversions are almost never
> > applied wholesale.
> > 
> > This patch is not appropriate until there are no more
> > uses of DEFINE_PCI_DEVICE_TABLE in Linus' tree.
> > 
> > Just marking the function as deprecated in the
> > documentation and the pci.h file is probably good
> > enough for now.
> > 
> > see:  http://lkml.org/lkml/2013/12/2/400
> 
> Actually, I want to remove all DEFINE_PCI_DEVICE_TABLEs from the
> next 3.14-rc1 kernel, by merging all patches through Greg's tree.
> 
> Greg,
> How about you?

No, take them through their individual driver trees please.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index 6f45856..2f14be7 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -123,8 +123,7 @@  initialization with a pointer to a structure describing the driver
 
 
 The ID table is an array of struct pci_device_id entries ending with an
-all-zero entry; use of the macro DEFINE_PCI_DEVICE_TABLE is the preferred
-method of declaring the table.  Each entry consists of:
+all-zero entry; Each entry consists of:
 
 	vendor,device	Vendor and device ID to match (or PCI_ANY_ID)
 
diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c
index 50ce680..d9d249a2 100644
--- a/drivers/pci/ioapic.c
+++ b/drivers/pci/ioapic.c
@@ -99,7 +99,7 @@  static void ioapic_remove(struct pci_dev *dev)
 }
 
 
-static DEFINE_PCI_DEVICE_TABLE(ioapic_devices) = {
+static const struct pci_device_id ioapic_devices[] = {
 	{ PCI_DEVICE_CLASS(PCI_CLASS_SYSTEM_PIC_IOAPIC, ~0) },
 	{ PCI_DEVICE_CLASS(PCI_CLASS_SYSTEM_PIC_IOXAPIC, ~0) },
 	{ }
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 1084a15..6c1f6af 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -631,16 +631,6 @@  struct pci_driver {
 #define	to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
 
 /**
- * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table
- * @_table: device table name
- *
- * This macro is used to create a struct pci_device_id array (a device table)
- * in a generic manner.
- */
-#define DEFINE_PCI_DEVICE_TABLE(_table) \
-	const struct pci_device_id _table[]
-
-/**
  * PCI_DEVICE - macro used to describe a specific pci device
  * @vend: the 16 bit PCI Vendor ID
  * @dev: the 16 bit PCI Device ID