From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Andi Kleen <ak@suse.de>
Cc: "Adam J. Richter" <adam@yggdrasil.com>, linux-kernel@vger.kernel.org
Subject: Re: Patch(?): pci_device_id tables for linux-2.4.0-test11/drivers/block
Date: Wed, 22 Nov 2000 17:34:13 -0500 [thread overview]
Message-ID: <3A1C49E5.DC34BD54@mandrakesoft.com> (raw)
In-Reply-To: <200011222201.OAA29131@baldur.yggdrasil.com> <3A1C454E.FC4787CE@mandrakesoft.com> <20001122231854.A29401@gruyere.muc.suse.de>
Andi Kleen wrote:
>
> On Wed, Nov 22, 2000 at 05:14:38PM -0500, Jeff Garzik wrote:
> > *This* is the over-engineering attitude I was talking about. The only
> > reason why you are preferring named initializers is because
> > pci_device_id MIGHT be changed. And if it is changed, it makes the
> > changeover just tad easier. For that, you ugly up the code and make it
> > more difficult to maintain.
>
> The other reason is that it makes self documenting code -- no need to look
> up the structure definition to make sense out of the code.
For the general case, that is true.
But note that the general case is usually a -single- structure being
initialized, not an array of structures. Unless the struct members
being initialized vary wildly from one array element to another, using
named initialized it redundant and -reduces- the ability of the
programmer to look at the pci_tbl[] and evaluate its contents at a
glance.
PCI tables do not use named initalizers on purpose. It was not an
accident or design mistake.
Jeff
--
Jeff Garzik |
Building 1024 | The chief enemy of creativity is "good" sense
MandrakeSoft | -- Picasso
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-22 23:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-22 22:01 Patch(?): pci_device_id tables for linux-2.4.0-test11/drivers/block Adam J. Richter
2000-11-22 22:14 ` Jeff Garzik
2000-11-22 22:18 ` Andi Kleen
2000-11-22 22:34 ` Jeff Garzik [this message]
2000-11-22 22:36 ` Keith Owens
2000-11-23 0:50 ` Russell King
-- strict thread matches above, loose matches on Subject: below --
2000-11-23 2:18 Adam J. Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A1C49E5.DC34BD54@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=adam@yggdrasil.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox