From: Peter Zijlstra <peterz@infradead.org>
To: Byungchul Park <byungchul.park@lge.com>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Enhance readability of iterating wake_list
Date: Fri, 10 Feb 2017 08:55:23 +0100 [thread overview]
Message-ID: <20170210075523.GF6515@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1486699771-8007-1-git-send-email-byungchul.park@lge.com>
On Fri, Feb 10, 2017 at 01:09:31PM +0900, Byungchul Park wrote:
> +#define for_each_wake_list(task, node) \
> + for ((task) = llist_entry((node), struct task_struct, wake_entry); \
> + node; (node) = llist_next(node), \
> + (task) = llist_entry((node), struct task_struct, wake_entry))
> +
How about you make that llist_for_each(pos, member) or similar and
replace all while (foo) { foo = llist_next(foo); } instances?
Because most llist_next() users have the same pattern.
next prev parent reply other threads:[~2017-02-10 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 4:09 [PATCH] sched: Enhance readability of iterating wake_list Byungchul Park
2017-02-10 7:55 ` Peter Zijlstra [this message]
2017-02-10 9:55 ` Byungchul Park
2017-02-10 10:49 ` Byungchul Park
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=20170210075523.GF6515@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=byungchul.park@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.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 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.