From: Nishanth Aravamudan <nacc@us.ibm.com>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
kernel-janitors <kernel-janitors@lists.osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
Hanna Linder <hannal@us.ibm.com>,
greg@kroah.com
Subject: Re: [KJ] Re: [PATCH 2.6] hw_random.c: replace pci_find_device
Date: Mon, 25 Oct 2004 10:10:50 -0700 [thread overview]
Message-ID: <20041025171050.GB2209@us.ibm.com> (raw)
In-Reply-To: <9e473391041025094812aa9923@mail.gmail.com>
On Mon, Oct 25, 2004 at 12:48:43PM -0400, Jon Smirl wrote:
> On Thu, 21 Oct 2004 18:48:58 -0400, Jeff Garzik <jgarzik@pobox.com> wrote:
> > applied
>
> I just pulled from Linus bk, for_each_pci_dev isn't defined anywhere.
> I get compile errors in hw_random.c.
>
> [jonsmirl@smirl linux-2.5]$ grep -rI for_each_pci_dev *
> drivers/char/hw_random.c: for_each_pci_dev(pdev) {
> SCCS/s.ChangeSet:\x01c for_each_pci_dev is a macro wrapper around pci_get_device.
> [jonsmirl@smirl linux-2.5]$
I believe some people missed Hanna's first patch which defined
for_each_pci_dev so she sent it again a few days after. Here is her
message again...
-Nish
-------
I wrote this macro last week and was recently asked to resend it in case people
missed the original submission. I have been using it during my conversion to
pci_get_device and it seems to be fine.
Hanna Linder
IBM Linux Technology Center
Signed-off-by: Hanna Linder <hannal@us.ibm.com>
---
diff -Nrup linux-2.6.9-rc3-mm2cln/include/linux/pci.h linux-2.6.9-rc3-mm2patch/include/linux/pci.h
--- linux-2.6.9-rc3-mm2cln/include/linux/pci.h 2004-10-04 11:38:51.000000000 -0700
+++ linux-2.6.9-rc3-mm2patch/include/linux/pci.h 2004-10-05 15:56:26.000000000 -0700
@@ -548,6 +548,7 @@ struct pci_dev {
#define pci_dev_g(n) list_entry(n, struct pci_dev, global_list)
#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)
#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
+#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
/*
* For PCI devices, the region numbers are assigned this way:
next prev parent reply other threads:[~2004-10-25 17:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 18:38 Hanna Linder
2004-10-21 22:48 ` Jeff Garzik
2004-10-25 16:48 ` Jon Smirl
2004-10-25 17:10 ` Nishanth Aravamudan [this message]
2004-10-25 16:59 ` Chris Wright
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=20041025171050.GB2209@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=greg@kroah.com \
--cc=hannal@us.ibm.com \
--cc=jgarzik@pobox.com \
--cc=jonsmirl@gmail.com \
--cc=kernel-janitors@lists.osdl.org \
--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
Powered by JetHome