[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: C99 Initialisers
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" :)


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.148 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site