public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] irq_work: Don't reinvent the wheel but use existing llist API
@ 2017-05-12  0:45 Byungchul Park
  2017-05-30  5:29 ` Byungchul Park
  0 siblings, 1 reply; 8+ messages in thread
From: Byungchul Park @ 2017-05-12  0:45 UTC (permalink / raw)
  To: fweisbec; +Cc: linux-kernel, kernel-team

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

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 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.
-- 
1.9.1

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

end of thread, other threads:[~2017-10-25  5:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12  0:45 [RESEND PATCH] irq_work: Don't reinvent the wheel but use existing llist API Byungchul Park
2017-05-30  5:29 ` Byungchul Park
2017-05-31 14:04   ` Frederic Weisbecker
2017-06-01  7:29     ` Byungchul Park
2017-09-05  2:38     ` Byungchul Park
2017-09-27  0:00     ` Byungchul Park
2017-10-18  5:11     ` Byungchul Park
2017-10-25  5:51     ` Byungchul Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox