Commit 0492e1bb authored by Stuart Bennett's avatar Stuart Bennett Committed by Ingo Molnar

tracing: x86, mmiotrace: code consistency/legibility improvement

kmmio_probe being *p and kmmio_fault_page being sometimes *f and
sometimes *p is not helpful.

[ Impact: cleanup ]
Signed-off-by: default avatarStuart Bennett <stuart@freedesktop.org>
Acked-by: default avatarPekka Paalanen <pq@iki.fi>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1240946271-7083-3-git-send-email-stuart@freedesktop.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 7d7d2b80
...@@ -97,13 +97,13 @@ static struct kmmio_probe *get_kmmio_probe(unsigned long addr) ...@@ -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) static struct kmmio_fault_page *get_kmmio_fault_page(unsigned long page)
{ {
struct list_head *head; struct list_head *head;
struct kmmio_fault_page *p; struct kmmio_fault_page *f;
page &= PAGE_MASK; page &= PAGE_MASK;
head = kmmio_page_list(page); head = kmmio_page_list(page);
list_for_each_entry_rcu(p, head, list) { list_for_each_entry_rcu(f, head, list) {
if (p->page == page) if (f->page == page)
return p; return f;
} }
return NULL; return NULL;
} }
...@@ -439,12 +439,12 @@ static void rcu_free_kmmio_fault_pages(struct rcu_head *head) ...@@ -439,12 +439,12 @@ static void rcu_free_kmmio_fault_pages(struct rcu_head *head)
head, head,
struct kmmio_delayed_release, struct kmmio_delayed_release,
rcu); rcu);
struct kmmio_fault_page *p = dr->release_list; struct kmmio_fault_page *f = dr->release_list;
while (p) { while (f) {
struct kmmio_fault_page *next = p->release_next; struct kmmio_fault_page *next = f->release_next;
BUG_ON(p->count); BUG_ON(f->count);
kfree(p); kfree(f);
p = next; f = next;
} }
kfree(dr); kfree(dr);
} }
...@@ -453,19 +453,19 @@ static void remove_kmmio_fault_pages(struct rcu_head *head) ...@@ -453,19 +453,19 @@ static void remove_kmmio_fault_pages(struct rcu_head *head)
{ {
struct kmmio_delayed_release *dr = struct kmmio_delayed_release *dr =
container_of(head, struct kmmio_delayed_release, rcu); 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; struct kmmio_fault_page **prevp = &dr->release_list;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&kmmio_lock, flags); spin_lock_irqsave(&kmmio_lock, flags);
while (p) { while (f) {
if (!p->count) { if (!f->count) {
list_del_rcu(&p->list); list_del_rcu(&f->list);
prevp = &p->release_next; prevp = &f->release_next;
} else { } else {
*prevp = p->release_next; *prevp = f->release_next;
} }
p = p->release_next; f = f->release_next;
} }
spin_unlock_irqrestore(&kmmio_lock, flags); spin_unlock_irqrestore(&kmmio_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment