Re: C99 Initialisers

From: Jeff Garzik
Date: Tue Aug 12 2003 - 20:38:34 EST


Dave Jones wrote:
On Tue, Aug 12, 2003 at 05:37:42PM -0700, Randy.Dunlap wrote:
> | 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.

What exactly would be the benefit of this ?
The only thing I could think of was out-of-kernel tools to do
things like matching modules to pci IDs, but that seems to be
done mechanically by various distros already reading the pci_driver
structs.


Fundamentally, the PCI ID list is not C code. And if anyone ever wants to get to the PCI ID lists at the _source code_ level, they have to parse C or assembler :) It's data, so I say, put it in a data file. Stuffing the PCI ID list in C code is a sometimes convenient, sometimes inconvenient form of packaging, nothing more :)

I would rather store the PCI ID list in a more natural form, and then use small tool to generate the pci_device_id tables that are linked into the kernel.

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/