lkml.org 
[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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" :)

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site