Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH 38/39] PCI: remove DEFINE_PCI_DEVICE_TABLE macro
       [not found] <001501ceefb1$69c96820$3d5c3860$%han@samsung.com>
@ 2013-12-02 23:32 ` Jingoo Han
  2013-12-02 23:52   ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2013-12-02 23:32 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: linux-kernel, 'Jingoo Han', 'Bjorn Helgaas',
	linux-pci

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

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
-- 
1.7.10.4



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

* Re: [PATCH 38/39] PCI: remove DEFINE_PCI_DEVICE_TABLE macro
  2013-12-02 23:32 ` [PATCH 38/39] PCI: remove DEFINE_PCI_DEVICE_TABLE macro Jingoo Han
@ 2013-12-02 23:52   ` Joe Perches
  2013-12-03  1:15     ` Jingoo Han
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-12-02 23:52 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'Greg Kroah-Hartman', linux-kernel,
	'Bjorn Helgaas', linux-pci

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



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

* Re: [PATCH 38/39] PCI: remove DEFINE_PCI_DEVICE_TABLE macro
  2013-12-02 23:52   ` Joe Perches
@ 2013-12-03  1:15     ` Jingoo Han
  2013-12-03  1:27       ` 'Greg Kroah-Hartman'
  0 siblings, 1 reply; 4+ messages in thread
From: Jingoo Han @ 2013-12-03  1:15 UTC (permalink / raw)
  To: 'Joe Perches', 'Greg Kroah-Hartman'
  Cc: linux-kernel, 'Bjorn Helgaas', linux-pci,
	'Jingoo Han'

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


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

* Re: [PATCH 38/39] PCI: remove DEFINE_PCI_DEVICE_TABLE macro
  2013-12-03  1:15     ` Jingoo Han
@ 2013-12-03  1:27       ` 'Greg Kroah-Hartman'
  0 siblings, 0 replies; 4+ messages in thread
From: 'Greg Kroah-Hartman' @ 2013-12-03  1:27 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'Joe Perches', linux-kernel, 'Bjorn Helgaas',
	linux-pci

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

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

end of thread, other threads:[~2013-12-03  1:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <001501ceefb1$69c96820$3d5c3860$%han@samsung.com>
2013-12-02 23:32 ` [PATCH 38/39] PCI: remove DEFINE_PCI_DEVICE_TABLE macro Jingoo Han
2013-12-02 23:52   ` Joe Perches
2013-12-03  1:15     ` Jingoo Han
2013-12-03  1:27       ` 'Greg Kroah-Hartman'

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox