From: 苏辉 <sh_def@163.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re:Re: [PATCH] sched/rt.c: use list_is_singular() instead of '->prev != ->next'
Date: Tue, 27 Oct 2020 10:07:47 +0800 (CST) [thread overview]
Message-ID: <7d001f9c.1225.17567cfb5f0.Coremail.sh_def@163.com> (raw)
In-Reply-To: <20201026142956.0a429137@gandalf.local.home>
>Perhaps there should be a list_has_more_than_one() API, as list_is_singular
>requires two checks, and the "more_than_one" only requires a single check.
>
>list_is_singular() is:
>
> return !list_empty(list) && (list->next == list->prev);
>
>
>which is more work than what you are replacing.
>
Hi, Steve:
Thanks for your explanation.
Maybe we should add another api called "list_more_than_one" just without
list_empty() check.
I will send PATCH V2 later.
Thank.
prev parent reply other threads:[~2020-10-27 3:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 17:41 Hui Su
2020-10-26 18:29 ` Steven Rostedt
2020-10-27 2:07 ` 苏辉 [this message]
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=7d001f9c.1225.17567cfb5f0.Coremail.sh_def@163.com \
--to=sh_def@163.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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®