From: Jiri Slaby <jirislaby@gmail.com>
To: "David Härdeman" <david@2gen.com>
Cc: Naveen Gupta <ngupta@google.com>, linux-kernel@vger.kernel.org
Subject: Re: [-mm PATCH] remove use of pci_find_device in watchdog driver for Intel 6300ESB chipset
Date: Tue, 16 Aug 2005 02:19:24 +0200 [thread overview]
Message-ID: <4301310C.8040505@gmail.com> (raw)
In-Reply-To: <20050815231426.GA19111@hardeman.nu>
David Härdeman napsal(a):
> On Mon, Aug 15, 2005 at 02:30:15PM -0700, Naveen Gupta wrote:
> [...}
>
>> - while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev))
>> != NULL) {
>> - if (pci_match_id(esb_pci_tbl, dev)) {
>> - esb_pci = dev;
>> - break;
>> - }
>> - }
>> + while (ids->vendor && ids->device) {
>> + if ((dev = pci_get_device(ids->vendor, ids->device, dev)) !=
>> NULL) {
>> + esb_pci = dev;
>> + break;
>> + }
>> + ids++;
>> + }
>
>
> I'm certainly not sure about this, but the proposed while loop looks a
> bit unconventional, wouldn't something like:
>
> for_each_pci_dev(dev)
> if (pci_match_id(esb_pci_tbl, dev)) {
> esb_pci = dev;
> break;
> }
> }
>
> be better?
I did it here http://lkml.org/lkml/2005/8/9/305, but it wasn't acked
yet. I should repost.
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
prev parent reply other threads:[~2005-08-16 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 21:30 [-mm PATCH] remove use of pci_find_device in watchdog driver for Intel 6300ESB chipset Naveen Gupta
2005-08-15 23:14 ` David Härdeman
2005-08-16 0:19 ` Jiri Slaby [this message]
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=4301310C.8040505@gmail.com \
--to=jirislaby@gmail.com \
--cc=david@2gen.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@google.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