From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI fixes for 2.6.9
Date: Tue, 19 Oct 2004 15:42:15 -0700 [thread overview]
Message-ID: <10982257351131@kroah.com> (raw)
In-Reply-To: <109822573458@kroah.com>
ChangeSet 1.1997.37.22, 2004/10/06 12:11:10-07:00, janitor@sternwelten.at
[PATCH] PCI list_for_each: arch-ppc-kernel-pci.c
s/for/list_for_each/
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
arch/ppc/kernel/pci.c | 28 +++++++++-------------------
1 files changed, 9 insertions(+), 19 deletions(-)
diff -Nru a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
--- a/arch/ppc/kernel/pci.c 2004-10-19 15:25:48 -07:00
+++ b/arch/ppc/kernel/pci.c 2004-10-19 15:25:48 -07:00
@@ -231,14 +231,12 @@
static void __init
pcibios_allocate_bus_resources(struct list_head *bus_list)
{
- struct list_head *ln;
struct pci_bus *bus;
int i;
struct resource *res, *pr;
/* Depth-First Search on bus tree */
- for (ln = bus_list->next; ln != bus_list; ln=ln->next) {
- bus = pci_bus_b(ln);
+ list_for_each_entry(bus, bus_list, node) {
for (i = 0; i < 4; ++i) {
if ((res = bus->resource[i]) == NULL || !res->flags
|| res->start > res->end)
@@ -381,7 +379,6 @@
struct pci_bus *bus;
struct pci_dev *dev;
struct resource *r;
- struct list_head *ln;
int i;
for (r = pr->child; r != NULL; r = r->sibling) {
@@ -390,9 +387,7 @@
return 1;
}
}
- for (ln = parent->children.next; ln != &parent->children;
- ln = ln->next) {
- bus = pci_bus_b(ln);
+ list_for_each_entry(bus, &parent->children, node) {
for (i = 0; i < 4; ++i) {
if ((r = bus->resource[i]) == NULL)
continue;
@@ -406,8 +401,7 @@
}
}
}
- for (ln = parent->devices.next; ln != &parent->devices; ln=ln->next) {
- dev = pci_dev_b(ln);
+ list_for_each_entry(dev, &parent->devices, bus_list) {
for (i = 0; i < 6; ++i) {
r = &dev->resource[i];
if (!r->flags || (r->flags & IORESOURCE_UNSET))
@@ -1102,7 +1096,7 @@
static int __init
check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga)
{
- struct list_head *ln;
+ struct pci_dev *dev;
int i;
int rc = 0;
@@ -1110,8 +1104,7 @@
res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \
} while (0)
- for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
- struct pci_dev *dev = pci_dev_b(ln);
+ list_for_each_entry(dev, &bus->devices, bus_list) {
u16 class = dev->class >> 8;
if (class == PCI_CLASS_DISPLAY_VGA ||
@@ -1152,7 +1145,7 @@
static void __init
do_fixup_p2p_level(struct pci_bus *bus)
{
- struct list_head *ln;
+ struct pci_bus *b;
int i, parent_io;
int has_vga = 0;
@@ -1163,8 +1156,7 @@
if (parent_io >= 4)
return;
- for (ln=bus->children.next; ln != &bus->children; ln=ln->next) {
- struct pci_bus *b = pci_bus_b(ln);
+ list_for_each_entry(b, &bus->children, node) {
struct pci_dev *d = b->self;
struct pci_controller* hose = (struct pci_controller *)d->sysdata;
struct resource *res = b->resource[0];
@@ -1237,12 +1229,10 @@
static void
pcibios_fixup_p2p_bridges(void)
{
- struct list_head *ln;
+ struct pci_bus *b;
- for(ln=pci_root_buses.next; ln != &pci_root_buses; ln=ln->next) {
- struct pci_bus *b = pci_bus_b(ln);
+ list_for_each_entry(b, &pci_root_buses, node)
do_fixup_p2p_level(b);
- }
}
#endif /* CONFIG_PPC_PMAC */
next prev parent reply other threads:[~2004-10-19 23:35 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-19 22:37 [BK PATCH] PCI fixes for 2.6.9 Greg KH
2004-10-19 22:42 ` [PATCH] " Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH [this message]
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-19 22:42 ` Greg KH
2004-10-20 8:10 ` Russell King
2004-10-22 23:45 ` Greg KH
2004-10-24 16:47 ` Alan Cox
2004-11-20 18:45 ` Russell King
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=10982257351131@kroah.com \
--to=greg@kroah.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.