Messages in this thread | | | Date | Tue, 12 Aug 2003 17:37:42 -0700 | From | "Randy.Dunlap" <> | Subject | Re: C99 Initialisers |
| |
On Tue, 12 Aug 2003 20:31:41 -0400 Jeff Garzik <jgarzik@pobox.com> wrote:
| Randy.Dunlap wrote: | > On Tue, 12 Aug 2003 20:02:03 -0400 Jeff Garzik <jgarzik@pobox.com> wrote: | > | > | Greg KH wrote: | > | > In the end, it's up to the maintainer of the driver what they want to | > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | > | > do. So, Jeff and David, here's a patch against the latest 2.6.0-test3 | > | > tg3.c that converts the pci_device_id table to C99 initializers. If you | > | > want to, please apply it. | > | > I strongly agree with Greg's comment above. | > | | > | it expands a few lines to a bazillion :( I would rather leave it as | > | is... you'll find several PCI ethernet drivers with pci_device_id | > | entries that fit entirely on one line, and I think that compactness has | > | value at least to me. | > | > However, I would change for readability. Maybe not my readability, | > but for all others who read and try to help maintain all of Linux | > source code. | | | I find the compact form quite readable, and comfortable on the eyes.
and since you are the drivers/net/ maintainer, you can make the decision. However, in the end, it's not just about you. You are the primary maintainer but not the only user or maintainer of those drivers.
| Users don't seem to complain, either. I get compact-form pci_device_id | patches from Joe Sixpack quite often :) | | Expanding this device id struct to use C99 initializers isn't terribly | scalable: once you get past just a few ids, you bloat up the source | code considerably. I would much rather move the PCI ids out of the | drivers altogether, into some metadata file(s) in the kernel source | tree, than bloat up tg3, tulip, e100, and the other PCI id-heavy | drivers' source code.
That last few lines certainly sounds desirable.
-- ~Randy For Linux-2.6, see: http://www.kernel.org/pub/linux/kernel/people/davej/misc/post-halloween-2.5.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |