On Tuesday, December 03, 2013 11:37 AM, Stephen Hemminger wrote: > On Tue, 03 Dec 2013 08:19:25 +0900 > Jingoo Han <jg1....@samsung.com> wrote: > > > Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro > > is not preferred. > > > > Signed-off-by: Jingoo Han <jg1....@samsung.com> > > Perhaps a little more explanation why it is not preferred. > Not everyone tracks LKML or the PCI list.
(+cc Joe Perches, Jonas Bonn) It is simple. 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/