From: Stuart Bennett <stuart@freedesktop.org>
To: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>
Cc: Pekka Paalanen <pq@iki.fi>,
linux-kernel@vger.kernel.org,
Stuart Bennett <stuart@freedesktop.org>
Subject: [PATCH] x86 mmiotrace: code consistency/legibility improvement
Date: Tue, 28 Apr 2009 20:17:49 +0100 [thread overview]
Message-ID: <1240946271-7083-3-git-send-email-stuart@freedesktop.org> (raw)
In-Reply-To: <1240946271-7083-2-git-send-email-stuart@freedesktop.org>
kmmio_probe being *p and kmmio_fault_page being sometimes *f and
sometimes *p is not helpful
Signed-off-by: Stuart Bennett <stuart@freedesktop.org>
Acked-by: Pekka Paalanen <pq@iki.fi>
---
arch/x86/mm/kmmio.c | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 50dc802..6db840e 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -97,13 +97,13 @@ static struct kmmio_probe *get_kmmio_probe(unsigned long addr)
static struct kmmio_fault_page *get_kmmio_fault_page(unsigned long page)
{
struct list_head *head;
- struct kmmio_fault_page *p;
+ struct kmmio_fault_page *f;
page &= PAGE_MASK;
head = kmmio_page_list(page);
- list_for_each_entry_rcu(p, head, list) {
- if (p->page == page)
- return p;
+ list_for_each_entry_rcu(f, head, list) {
+ if (f->page == page)
+ return f;
}
return NULL;
}
@@ -439,12 +439,12 @@ static void rcu_free_kmmio_fault_pages(struct rcu_head *head)
head,
struct kmmio_delayed_release,
rcu);
- struct kmmio_fault_page *p = dr->release_list;
- while (p) {
- struct kmmio_fault_page *next = p->release_next;
- BUG_ON(p->count);
- kfree(p);
- p = next;
+ struct kmmio_fault_page *f = dr->release_list;
+ while (f) {
+ struct kmmio_fault_page *next = f->release_next;
+ BUG_ON(f->count);
+ kfree(f);
+ f = next;
}
kfree(dr);
}
@@ -453,19 +453,19 @@ static void remove_kmmio_fault_pages(struct rcu_head *head)
{
struct kmmio_delayed_release *dr =
container_of(head, struct kmmio_delayed_release, rcu);
- struct kmmio_fault_page *p = dr->release_list;
+ struct kmmio_fault_page *f = dr->release_list;
struct kmmio_fault_page **prevp = &dr->release_list;
unsigned long flags;
spin_lock_irqsave(&kmmio_lock, flags);
- while (p) {
- if (!p->count) {
- list_del_rcu(&p->list);
- prevp = &p->release_next;
+ while (f) {
+ if (!f->count) {
+ list_del_rcu(&f->list);
+ prevp = &f->release_next;
} else {
- *prevp = p->release_next;
+ *prevp = f->release_next;
}
- p = p->release_next;
+ f = f->release_next;
}
spin_unlock_irqrestore(&kmmio_lock, flags);
--
1.5.4.4
next prev parent reply other threads:[~2009-04-28 19:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 19:17 [PATCH 0/4] mmiotrace: various fixes and cleaning Stuart Bennett
2009-04-28 19:17 ` [PATCH] x86 mmiotrace: fix range test Stuart Bennett
2009-04-28 19:17 ` Stuart Bennett [this message]
2009-04-28 19:17 ` [PATCH] x86 mmiotrace: refactor clearing/restore of page presence Stuart Bennett
2009-04-28 19:17 ` [PATCH] x86 mmiotrace: only register for die notifier when tracer active Stuart Bennett
2009-04-29 9:39 ` Ingo Molnar
2009-04-29 11:05 ` [tip:tracing/core] tracing: x86, " tip-bot for Stuart Bennett
2009-04-29 11:04 ` [tip:tracing/core] tracing: x86, mmiotrace: refactor clearing/restore of page presence tip-bot for Stuart Bennett
2009-04-29 11:04 ` [tip:tracing/core] tracing: x86, mmiotrace: code consistency/legibility improvement tip-bot for Stuart Bennett
2009-04-29 11:04 ` [tip:tracing/urgent] tracing: x86, mmiotrace: fix range test tip-bot for Stuart Bennett
2009-04-29 9:36 ` [PATCH 0/4] mmiotrace: various fixes and cleaning Ingo Molnar
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=1240946271-7083-3-git-send-email-stuart@freedesktop.org \
--to=stuart@freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pq@iki.fi \
--cc=rostedt@goodmis.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