[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1315836348.26517.41.camel@twins>
Date: Mon, 12 Sep 2011 16:05:48 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Huang Ying <ying.huang@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Andi Kleen <andi@...stfloor.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: [PATCH 6/5] llist: Add llist_next()
Subject: llist: Add llist_next()
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Date: Mon Sep 12 13:12:28 CEST 2011
So we don't have to expose the struct list_node members
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
---
include/linux/llist.h | 5 +++++
kernel/irq_work.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
Index: linux-2.6/include/linux/llist.h
===================================================================
--- linux-2.6.orig/include/linux/llist.h
+++ linux-2.6/include/linux/llist.h
@@ -144,6 +144,11 @@ static inline bool llist_empty(const str
return ACCESS_ONCE(head->first) == NULL;
}
+static inline struct llist_node *llist_next(struct llist_node *node)
+{
+ return node->next;
+}
+
/**
* llist_add - add a new entry
* @new: new entry to be added
Index: linux-2.6/kernel/irq_work.c
===================================================================
--- linux-2.6.orig/kernel/irq_work.c
+++ linux-2.6/kernel/irq_work.c
@@ -110,7 +110,7 @@ void irq_work_run(void)
while (llnode != NULL) {
work = llist_entry(llnode, struct irq_work, llnode);
- llnode = llnode->next;
+ llnode = llist_next(llnode);
/*
* Clear the PENDING bit, after this point the @work
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists