* [patch 1/5] use list_for_each() drivers/pcmcia/rsrc_mgr.c
@ 2004-09-23 20:19 janitor
0 siblings, 0 replies; only message in thread
From: janitor @ 2004-09-23 20:19 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, janitor, domen
Use list_for_each() where applicable
- for (list = ymf_devs.next; list != &ymf_devs; list = list->next) {
+ list_for_each(list, &ymf_devs) {
pure cosmetic change, defined as a preprocessor macro in:
include/linux/list.h
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---
linux-2.6.9-rc2-bk7-max/drivers/pcmcia/rsrc_mgr.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff -puN drivers/pcmcia/rsrc_mgr.c~list_for_each-pcmcia-rsrc_mgr drivers/pcmcia/rsrc_mgr.c
--- linux-2.6.9-rc2-bk7/drivers/pcmcia/rsrc_mgr.c~list_for_each-pcmcia-rsrc_mgr 2004-09-21 20:46:36.000000000 +0200
+++ linux-2.6.9-rc2-bk7-max/drivers/pcmcia/rsrc_mgr.c 2004-09-21 20:46:36.000000000 +0200
@@ -469,7 +469,7 @@ static void validate_mem(struct pcmcia_s
}
if (lo++)
goto out;
- for (m = mem_db.next; m != &mem_db; m = mm.next) {
+ list_for_each(m, &mem_db) {
mm = *m;
/* Only probe < 1 MB */
if (mm.base >= 0x100000) continue;
@@ -501,7 +501,7 @@ static void validate_mem(struct pcmcia_s
if (done++ == 0) {
down(&rsrc_sem);
- for (m = mem_db.next; m != &mem_db; m = mm.next) {
+ list_for_each(m, &mem_db) {
mm = *m;
if (do_mem_probe(mm.base, mm.num, s))
break;
@@ -985,11 +985,11 @@ void release_resource_db(void)
{
resource_map_t *p, *q;
- for (p = mem_db.next; p != &mem_db; p = q) {
+ list_for_each(p, &mem_db) {
q = p->next;
kfree(p);
}
- for (p = io_db.next; p != &io_db; p = q) {
+ list_for_each(p, &io_db) {
q = p->next;
kfree(p);
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-23 20:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23 20:19 [patch 1/5] use list_for_each() drivers/pcmcia/rsrc_mgr.c janitor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®