From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: 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:14:38 -0500 [thread overview]
Message-ID: <3A1C454E.FC4787CE@mandrakesoft.com> (raw)
In-Reply-To: <200011222201.OAA29131@baldur.yggdrasil.com>
"Adam J. Richter" wrote:
> Just to avoid duplication of effort, I am posting this preliminary
> patch which adds PCI MODULE_DEVICE_TABLE declarations to the three PCI
> drivers in linux-2.4.0-test11/drivers/block. In response to input from
> Christoph Hellwig, I have reduced my threshhold on using named initializers
> to three entries, although I think that may be going to far, as I would
> really like to keep the number of files that initialize the pci_device_id
> arrays this way low so that changing struct pci_device_id remains feasible.
*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.
_I_ am one of the people that works on maintaining these random PCI
drivers that no one gives a shit about. And if applied, your patches
make my job just a little bit harder.
We -discourage- these kind of crap design decisions in the Linux kernel.
Don't over-engineer.
> --- linux-2.4.0-test11/drivers/block/DAC960.c Thu Oct 26 23:35:47 2000
> +++ linux/drivers/block/DAC960.c Wed Nov 22 12:42:23 2000
ok
> --- linux-2.4.0-test11/drivers/block/cciss.c Thu Oct 26 23:35:47 2000
> +++ linux/drivers/block/cciss.c Wed Nov 22 12:29:27 2000
> @@ -50,6 +50,17 @@
> /* Embedded module documentation macros - see modules.h */
> MODULE_AUTHOR("Charles M. White III - Compaq Computer Corporation");
> MODULE_DESCRIPTION("Driver for Compaq Smart Array Controller 5300");
> +static struct pci_device_id cciss_pci_tbl[] __initdata = {
> + {
> + vendor: PCI_VENDOR_ID_COMPAQ,
> + device: PCI_DEVICE_ID_COMPAQ_CISS,
> + subvendor: PCI_ANY_ID,
> + subdevice: PCI_ANY_ID,
> + },
> + { } /* Terminating entry */
> +};
> +MODULE_DEVICE_TABLE(pci, cciss_pci_tbl);
hell no
> --- linux-2.4.0-test11/drivers/block/cpqarray.c Thu Nov 16 11:30:29 2000
> +++ linux/drivers/block/cpqarray.c Wed Nov 22 12:34:53 2000
ok
--
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 22:45 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 [this message]
2000-11-22 22:18 ` Andi Kleen
2000-11-22 22:34 ` Jeff Garzik
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=3A1C454E.FC4787CE@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=adam@yggdrasil.com \
--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