Re: C99 Initialisers
From: Jeff Garzik
Date: Wed Aug 13 2003 - 12:55:26 EST
Timothy Miller wrote:
Dave Jones wrote:
{
.vendor = PCI_VENDOR_ID_BROADCOM,
.devices = {
PCI_DEVICE_ID_TIGON3_5700,
PCI_DEVICE_ID_TIGON3_5701,
PCI_DEVICE_ID_TIGON3_5702,
PCI_DEVICE_ID_TIGON3_5703,
PCI_DEVICE_ID_TIGON3_5704,
PCI_DEVICE_ID_TIGON3_5702FE,
PCI_DEVICE_ID_TIGON3_5702X,
PCI_DEVICE_ID_TIGON3_5703X,
PCI_DEVICE_ID_TIGON3_5704S,
PCI_DEVICE_ID_TIGON3_5702A3,
PCI_DEVICE_ID_TIGON3_5703A3,
},
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID
struct devicelist BROADCOM_devs[] {
PCI_DEVICE_ID_TIGON3_5700,
PCI_DEVICE_ID_TIGON3_5701,
PCI_DEVICE_ID_TIGON3_5702,
PCI_DEVICE_ID_TIGON3_5703,
PCI_DEVICE_ID_TIGON3_5704,
PCI_DEVICE_ID_TIGON3_5702FE,
PCI_DEVICE_ID_TIGON3_5702X,
PCI_DEVICE_ID_TIGON3_5703X,
PCI_DEVICE_ID_TIGON3_5704S,
PCI_DEVICE_ID_TIGON3_5702A3,
PCI_DEVICE_ID_TIGON3_5703A3,
LIST_TERMINATOR};
This is proving my point ;-)
You guys are stretching the bounds of C with syntactic sugar, to make it
do something it doesn't do well: store data.
Better to store the data outside the C code, where you don't have to do
all this C mangling, and then use an automated tool to generate the C
code representing pci_device_id tables.
Jeff
-
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/