All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irq_work: Don't reinvent the wheel but use existing llist API
@ 2017-10-31  1:46 Frederic Weisbecker
  2017-10-31 12:04 ` [tip:irq/core] irq/work: " tip-bot for Byungchul Park
  2017-11-10  0:17 ` [PATCH] irq_work: " Chris Wilson
  0 siblings, 2 replies; 4+ messages in thread
From: Frederic Weisbecker @ 2017-10-31  1:46 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, Byungchul Park, Frederic Weisbecker, Peter Zijlstra

From: Byungchul Park <byungchul.park@lge.com>

Although llist provides proper APIs, they are not used. Make them used.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
 kernel/irq_work.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index bcf107c..e2ebe8c 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -138,11 +138,7 @@ static void irq_work_run_list(struct llist_head *list)
 		return;
 
 	llnode = llist_del_all(list);
-	while (llnode != NULL) {
-		work = llist_entry(llnode, struct irq_work, llnode);
-
-		llnode = llist_next(llnode);
-
+	llist_for_each_entry(work, llnode, llnode) {
 		/*
 		 * Clear the PENDING bit, after this point the @work
 		 * can be re-used.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-12 12:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-31  1:46 [PATCH] irq_work: Don't reinvent the wheel but use existing llist API Frederic Weisbecker
2017-10-31 12:04 ` [tip:irq/core] irq/work: " tip-bot for Byungchul Park
2017-11-10  0:17 ` [PATCH] irq_work: " Chris Wilson
2017-11-12 12:24   ` [tip:irq/core] irq/work: Use llist_for_each_entry_safe tip-bot for Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.