From: "David Härdeman" <david@2gen.com>
To: Naveen Gupta <ngupta@google.com>
Cc: 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 01:14:27 +0200 [thread overview]
Message-ID: <20050815231426.GA19111@hardeman.nu> (raw)
In-Reply-To: <Pine.LNX.4.56.0508151425320.27212@krishna.corp.google.com>
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?
//David
next prev parent reply other threads:[~2005-08-15 23:14 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 [this message]
2005-08-16 0:19 ` Jiri Slaby
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=20050815231426.GA19111@hardeman.nu \
--to=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