Re: C99 Initialisers
From: Jeff Garzik
Date: Wed Aug 13 2003 - 12:51:58 EST
Greg KH wrote:
# add PCI_DEVICE() macro to make pci_device_id tables easier to read.
diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c Wed Aug 13 10:29:08 2003
+++ b/drivers/net/tg3.c Wed Aug 13 10:29:08 2003
This patch is ok with me.
And I agree with David that, in generic, C99 initializers is the way to
go. However, the higher level point remains:
PCI IDs, and data like them, are fundamentally not C code.
I'm a strong believer in putting data in its most natural form, and then
transforming it via automated tools into the desired form. C code is a
natural form of data that describes "process and procedure", and the
compiler is the automated tool that transforms it. PCI ID tables are
data that is not process/procedure, but instead much more of a
traditional data table. So it should be a form more suitable for its
multiple uses. Distro installers and other utilities already pay
attention to the PCI ID tables in drivers. Why are we compiling
non-code into ELF .o objects, and then forcing people to extract that
non-code from .o files? In the South we call it "going around your
elbow to get to your thumb" :)
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/