[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use
- To: "James.Bottomley@xxxxxxxxxxxxxxxxxxxxx" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
- From: "Keller, Jacob E" <jacob.e.keller@xxxxxxxxx>
- Date: Fri, 18 Jul 2014 16:33:16 +0000
- Accept-language: en-US
- Cc: "linux-mips@xxxxxxxxxxxxxx" <linux-mips@xxxxxxxxxxxxxx>, "linux-fbdev@xxxxxxxxxxxxxxx" <linux-fbdev@xxxxxxxxxxxxxxx>, "linux-pci@xxxxxxxxxxxxxxx" <linux-pci@xxxxxxxxxxxxxxx>, "dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "benoit.taine@xxxxxxx" <benoit.taine@xxxxxxx>, "ath5k-devel@xxxxxxxxxxxxxxxx" <ath5k-devel@xxxxxxxxxxxxxxxx>, "linux-acenic@xxxxxxxxxx" <linux-acenic@xxxxxxxxxx>, "linux-scsi@xxxxxxxxxxxxxxx" <linux-scsi@xxxxxxxxxxxxxxx>, "linux-rdma@xxxxxxxxxxxxxxx" <linux-rdma@xxxxxxxxxxxxxxx>, "ath10k@xxxxxxxxxxxxxxxxxxx" <ath10k@xxxxxxxxxxxxxxxxxxx>, "linux-hippi@xxxxxxxxxx" <linux-hippi@xxxxxxxxxx>, "industrypack-devel@xxxxxxxxxxxxxxxxxxxxx" <industrypack-devel@xxxxxxxxxxxxxxxxxxxxx>, "linux-wireless@xxxxxxxxxxxxxxx" <linux-wireless@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "MPT-FusionLinux.pdl@xxxxxxxxxxxxx" <MPT-FusionLinux.pdl@xxxxxxxxxxxxx>, "platform-driver-x86@xxxxxxxxxxxxxxx" <platform-driver-x86@xxxxxxxxxxxxxxx>, "ath9k-devel@xxxxxxxxxxxxxxxx" <ath9k-devel@xxxxxxxxxxxxxxxx>, "wil6210@xxxxxxxxxxxxxxxx" <wil6210@xxxxxxxxxxxxxxxx>, "linux-pcmcia@xxxxxxxxxxxxxxxxxxx" <linux-pcmcia@xxxxxxxxxxxxxxxxxxx>, "linux-can@xxxxxxxxxxxxxxx" <linux-can@xxxxxxxxxxxxxxx>, "virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx" <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, "linux-mmc@xxxxxxxxxxxxxxx" <linux-mmc@xxxxxxxxxxxxxxx>, "users@xxxxxxxxxxxxxxxxxxxxxxx" <users@xxxxxxxxxxxxxxxxxxxxxxx>, "e1000-devel@xxxxxxxxxxxxxxxxxxxxx" <e1000-devel@xxxxxxxxxxxxxxxxxxxxx>, "linux-crypto@xxxxxxxxxxxxxxx" <linux-crypto@xxxxxxxxxxxxxxx>, "devel@xxxxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 18 Jul 2014 16:37:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
- Thread-index: AQHPop3teJgnKfPR00yIcydQ4bIfSZumetgAgAABOAA=
- Thread-topic: [PATCH 0/25] Replace DEFINE_PCI_DEVICE_TABLE macro use
On Fri, 2014-07-18 at 09:28 -0700, James Bottomley wrote:
> On Fri, 2014-07-18 at 17:26 +0200, Benoit Taine wrote:
> > We should prefer `const struct pci_device_id` over
> > `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines.
> > This issue was reported by checkpatch.
>
> What kernel coding style? checkpatch isn't the arbiter of style, if
> that's the only problem.
>
> The DEFINE_PCI macro was a well reasoned addition when it was added in
> 2008. The problem was most people were getting the definition wrong.
> When we converted away from CONFIG_HOTPLUG, having this DEFINE_ meant
> that only one place needed changing instead of hundreds for PCI tables.
>
> The reason people were getting the PCI table wrong was mostly the init
> section specifiers which are now gone, but it has enough underlying
> utility (mostly constification) that I don't think we'd want to churn
> the kernel hugely to make a change to struct pci_table and then have to
> start detecting and fixing misuses.
>
> James
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
I would rather fix the misuses of the macro, than remove it. Could we
possibly make checkpatch smart enough to tell when the macro is misused?
Thanks,
Jake
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|