[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: C99 Initialisers
    On Wed, Aug 13, 2003 at 01:47:54PM -0400, Jeff Garzik wrote:
    > 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.

    But the kernel, using C code, uses those ids to match drivers to
    devices. So we have to create C structures out of those ids some how.

    The idea was that since the kernel already keeps track of these ids, we
    might as well export them to userspace, so that it too can see what the
    kernel support. That brought forth the modules.*map files and enabled
    the hotplug scripts to automatically load a module based on a device id
    (this is much nicer than other os schemes which force a text file to be
    created for every driver listing these ids. They are usually created by
    hand, and can get out of sync.)

    I agree that now that more and more tools are using this data, we should
    put it into a form that everyone can easily get at, without having to
    parse module attributes or even the modules.*map files.

    Any suggestions that do not involve XML? :)


    greg k-h
    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.020 / U:3.560 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site