[lkml]   [2003]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: C99 Initialisers
Followup to:  <>
By author: Matthew Wilcox <>
In newsgroup:
> On Wed, Aug 13, 2003 at 12:53:24AM +0100, Dave Jones wrote:
> > What would be *really* nice, would be the ability to do something
> > to the effect of..
> While we're off in never-never land, it'd be nice to specify default
> values for struct initialisers. eg, something like:
> struct pci_device_id {
> __u32 vendor = PCI_ANY_ID;
> __u32 device = PCI_ANY_ID;
> __u32 subvendor = PCI_ANY_ID;
> __u32 subdevice = PCI_ANY_ID;
> __u32 class = 0;
> __u32 class_mask = 0;
> kernel_ulong_t driver_data = 0;
> };
> Erm, hang on a second ... Since when are PCI IDs 32-bit? What is this
> ridiculous bloat? You can't even argue that this makes things pack
> better since this packs equally well:

I usually find that treating VID:DID and SVID:SDID as two 32-bit
numbers makes a lot more sense than four 16-bit fields.

<> at work, <> in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.102 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site