Re: C99 Initialisers

From: Dave Jones
Date: Tue Aug 12 2003 - 12:42:17 EST


On Tue, Aug 12, 2003 at 03:39:36AM +0100, Matthew Wilcox wrote:

> By and large ... here's a counterexample:
>
> static struct pci_device_id tg3_pci_tbl[] __devinitdata = {
> { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5701,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
> ...
>
> I don't think anyone would appreciate you converting that to:
> <snip C99>

Depends. If it's a huuuge struct (see the device ID struct in 2.4's
agpgart for eg) it becomes much more readable. Whitespace good, clutter bad.

Dave

--
Dave Jones http://www.codemonkey.org.uk
-
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/