From: Byungchul Park <byungchul.park@lge.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: Enhance readability of iterating wake_list
Date: Fri, 10 Feb 2017 18:55:39 +0900 [thread overview]
Message-ID: <20170210095538.GD16086@X58A-UD3R> (raw)
In-Reply-To: <20170210075523.GF6515@twins.programming.kicks-ass.net>
On Fri, Feb 10, 2017 at 08:55:23AM +0100, Peter Zijlstra wrote:
> 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.
Yes, it would be better. I will do it.
Thank you.
next prev parent reply other threads:[~2017-02-10 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 4:09 Byungchul Park
2017-02-10 7:55 ` Peter Zijlstra
2017-02-10 9:55 ` Byungchul Park [this message]
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=20170210095538.GD16086@X58A-UD3R \
--to=byungchul.park@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®