From: Louis Zhuang <louis.zhuang@linux.co.intel.com>
To: Greg KH <greg@kroah.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] PCI code cleanup
Date: 18 Feb 2003 10:26:58 +0800 [thread overview]
Message-ID: <1045535218.1018.0.camel@hawk.sh.intel.com> (raw)
Dear Greg,
The patch clean up some old-style usage of list_head. Pls apply if you
like it. Thanks
--
Yours truly,
Louis Zhuang
--
Fault Injection Test Harness Project
BK tree: http://fault-injection.bkbits.net/linux-2.5
Home Page: http://sf.net/projects/fault-injection
===== drivers/pci/probe.c 1.26 vs edited =====
-- 1.26/drivers/pci/probe.c Mon Jan 13 11:44:26 2003
+++ edited/drivers/pci/probe.c Tue Feb 18 09:28:40 2003
@@ -533,7 +533,7 @@
{
const struct list_head *l;
- for(l=list->next; l != list; l = l->next) {
+ list_for_each(l, list) {
const struct pci_bus *b = pci_bus_b(l);
if (b->number == nr || pci_bus_exists(&b->children, nr))
return 1;
===== drivers/pci/setup-bus.c 1.12 vs edited =====
-- 1.12/drivers/pci/setup-bus.c Sun Dec 22 07:46:25 2002
+++ edited/drivers/pci/setup-bus.c Tue Feb 18 09:33:33 2003
@@ -45,7 +45,7 @@
int idx, found_vga = 0;
head.next = NULL;
- for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
+ list_for_each(ln, &bus->devices) {
struct pci_dev *dev = pci_dev_b(ln);
u16 class = dev->class >> 8;
@@ -208,7 +208,7 @@
if (!(b_res->flags & IORESOURCE_IO))
return;
- for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
+ list_for_each(ln, &bus->devices) {
struct pci_dev *dev = pci_dev_b(ln);
int i;
@@ -261,7 +261,7 @@
max_order = 0;
size = 0;
- for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
+ list_for_each(ln, &bus->devices) {
struct pci_dev *dev = pci_dev_b(ln);
int i;
@@ -325,8 +325,9 @@
struct list_head *ln;
unsigned long mask, type;
- for (ln=bus->children.next; ln != &bus->children; ln=ln->next)
+ list_for_each(ln, &bus->children) {
pci_bus_size_bridges(pci_bus_b(ln));
+ }
/* The root bus? */
if (!bus->self)
@@ -361,7 +362,7 @@
b->resource[0]->flags |= IORESOURCE_BUS_HAS_VGA;
}
}
- for (ln=bus->children.next; ln != &bus->children; ln=ln->next) {
+ list_for_each(ln, &bus->children) {
struct pci_bus *b = pci_bus_b(ln);
pci_bus_assign_resources(b);
next reply other threads:[~2003-02-18 2:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-18 2:26 Louis Zhuang [this message]
2003-02-18 2:57 ` [PATCH] PCI code cleanup Kai Germaschewski
2003-02-18 3:33 ` [PATCH] [RESEND] " Louis Zhuang
2003-02-18 4:39 ` Jeff Garzik
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=1045535218.1018.0.camel@hawk.sh.intel.com \
--to=louis.zhuang@linux.co.intel.com \
--cc=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.