Re: [PATCH 06/39] dma: remove DEFINE_PCI_DEVICE_TABLE macro

From: Jingoo Han
Date: Tue Dec 03 2013 - 19:19:28 EST


On Tuesday, December 03, 2013 9:11 PM, Shevchenko, Andriy wrote:
> On Tue, 2013-12-03 at 08:05 +0900, Jingoo Han wrote:
> > Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
> > is not preferred.
>
> I'm sorry, but Documentation/PCI/pci.txt still says "is the preferred
> method".
>
> Is there any link to patch for Documentation and discussion why change
> is established?

(+cc Joe Perches, Jonas Bonn)

Since last week, there has been discussion about this.
There is no special reason to use DEFINE_PCI_DEVICE_TABLE macro.

According to the Greg Kroah-Hartman,
"Yeah, and it's a horrid macro that deserves to be removed,
please don't use it in more places."

Currently, there is no other bus that has something like this
macro for their device ids. Thus, DEFINE_PCI_DEVICE_TABLE macro
should be removed.

Jonas Bonn (author of DEFINE_PCI_DEVICE_TABLE macro) also agreed
to remove this macro. According to Jonas Bonn,
"Actually, I think I submitted an even uglier macro called
DECLARE_PCI_DEVICE_TABLE... might have been the first kernel
Patch I ever sent? In any case, it should certainly have been
kindly rejected."

After Joe Perches's patch[1] is merged, I will send these patches
to each subsystem maintainer.

[1][PATCH] pci/checkpatch: Deprecate DEFINE_PCI_DEVICE_TABLE
(http://lkml.org/lkml/2013/12/2/400)

In this patch, Joe Perches fixed 'Documentation/PCI/pci.txt', and
'scripts/checkpatch.pl', in order to guide to use 'struct pci_device_id'
instead of 'DEFINE_PCI_DEVICE_TABLE' macro.

Thank you.

Best regards,
Jingoo Han

Best regards,
Jingoo Han

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/