From: Mark Rustad <mrustad@mac.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Kyle Moffett <mrmacman_g4@mac.com>,
Lee Revell <rlrevell@joe-job.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Greg KH <gregkh@suse.de>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] PCI: restore 2 missing pci ids
Date: Thu, 2 Feb 2006 09:24:09 -0600 [thread overview]
Message-ID: <CBCD4CAD-57C8-41A6-9265-83834064EADC@mac.com> (raw)
In-Reply-To: <43E1B490.7080200@pobox.com>
On Feb 2, 2006, at 1:28 AM, Jeff Garzik wrote:
> Kyle Moffett wrote:
>> On Feb 02, 2006, at 00:19, Lee Revell wrote:
>>> On Wed, 2006-02-01 at 23:11 -0600, Mark Rustad wrote:
>>>
>>>> Why were the ids removed in the first place?
>>>
>>> Because they weren't used by anything in the tree.
>> Also, the new PCI-ID policy is to put the defines in the driver
>> itself, near where it is used, instead of collecting them in a
>> single file. The goal is to minimize the number of unused PCI
>> IDs in the tree by keeping the definition near the usage.
>
> No, if you do create a constant for a PCI ID, it still should go
> into include/linux/pci_ids.h.
>
> Putting them in the driver will result in highly variable naming
> policies, which in turn means the constants are less grep-able than
> today.
>
> Device IDs simply do not need an associated constant, if they are
> used only in a PCI ID table. Device IDs are arbitrary numbers that
> are normally only used once in a source file.
>
> Vendor IDs are used repeatedly, and definitely belong in pci_ids.h.
> Device IDs make sense in pci_ids.h if they are used more than once.
Thank you for explaining the policy. In this particular case, there
was only one use of the ID in the file in question, so it could have
simply been a hex constant, I guess. Of course my instinct is to
avoid weird constants like this in source code, but I can learn to
make an exception for this kind of thing.
--
Mark Rustad, MRustad@mac.com
next prev parent reply other threads:[~2006-02-02 15:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200602010609.k1169QDX017012@hera.kernel.org>
2006-02-01 18:00 ` Jeff Garzik
2006-02-02 5:11 ` Mark Rustad
2006-02-02 5:19 ` Lee Revell
2006-02-02 7:01 ` Kyle Moffett
2006-02-02 7:28 ` Jeff Garzik
2006-02-02 15:24 ` Mark Rustad [this message]
2006-01-20 19:04 [PATCH] PCI Hotplug: shpchp: AMD POGO errata fix Greg KH
2006-01-20 19:04 ` [PATCH] PCI: restore 2 missing pci ids Greg KH
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=CBCD4CAD-57C8-41A6-9265-83834064EADC@mac.com \
--to=mrustad@mac.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mrmacman_g4@mac.com \
--cc=rlrevell@joe-job.com \
/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
all inboxes | Powered by JetHome®