From: janitor@sternwelten.at
To: akpm@digeo.com
Cc: linux-kernel@vger.kernel.org, janitor@sternwelten.at, domen@coderock.org
Subject: [patch 1/5] use list_for_each() drivers/pcmcia/rsrc_mgr.c
Date: Thu, 23 Sep 2004 22:19:41 +0200 [thread overview]
Message-ID: <E1CAa45-00074X-KK@sputnik> (raw)
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);
}
_
reply other threads:[~2004-09-23 20:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1CAa45-00074X-KK@sputnik \
--to=janitor@sternwelten.at \
--cc=akpm@digeo.com \
--cc=domen@coderock.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
all inboxes | Powered by JetHome®