mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Byungchul Park <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, frederic@kernel.org,
	byungchul.park@lge.com, peterz@infradead.org, tglx@linutronix.de,
	mingo@kernel.org, hpa@zytor.com, torvalds@linux-foundation.org
Subject: [tip:irq/core] irq/work: Don't reinvent the wheel but use existing llist API
Date: Tue, 31 Oct 2017 05:04:42 -0700	[thread overview]
Message-ID: <tip-16c0890dc66d258fdeccf7b15a133f3930b19143@git.kernel.org> (raw)
In-Reply-To: <1509414414-14987-1-git-send-email-frederic@kernel.org>

Commit-ID:  16c0890dc66d258fdeccf7b15a133f3930b19143
Gitweb:     https://git.kernel.org/tip/16c0890dc66d258fdeccf7b15a133f3930b19143
Author:     Byungchul Park <byungchul.park@lge.com>
AuthorDate: Tue, 31 Oct 2017 02:46:54 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 31 Oct 2017 10:24:39 +0100

irq/work: Don't reinvent the wheel but use existing llist API

Use the proper llist APIs instead of open-coded variants of them.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1509414414-14987-1-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@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.

  reply	other threads:[~2017-10-31 12:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31  1:46 [PATCH] irq_work: " Frederic Weisbecker
2017-10-31 12:04 ` tip-bot for Byungchul Park [this message]
2017-11-10  0:17 ` Chris Wilson
2017-11-12 12:24   ` [tip:irq/core] irq/work: Use llist_for_each_entry_safe tip-bot for Thomas Gleixner

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=tip-16c0890dc66d258fdeccf7b15a133f3930b19143@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=byungchul.park@lge.com \
    --cc=frederic@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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