Re: C99 Initialisers

From: Matthew Wilcox
Date: Wed Aug 13 2003 - 13:01:09 EST


On Wed, Aug 13, 2003 at 07:50:09PM +0200, Sam Ravnborg wrote:
> On Wed, Aug 13, 2003 at 10:31:51AM -0700, Greg KH wrote:
> >
> > How about this patch? If you like it I'll add the pci.h change to the
> > tree and let you take the tg3.c part.
> >
> > + { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700) },
> Why not without the extra {}'s so something like this:
>
> > + PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5701),
> > + PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5702),
> > { 0, }
> > };
> >
> > +#define PCI_DEVICE(vend,dev) { \
> > + .vendor = (vend), .device = (dev), \
> > + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID }

... and while we're at it:

+#define END_OF_LIST { 0, }

--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
-
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/