From: "Li,Rongqing" <lirongqing@baidu.com>
To: Michel Lespinasse <michel@lespinasse.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"mingo@kernel.org" <mingo@kernel.org>
Subject: 答复: [PATCH] rbtree: Remove unneeded check condition in rb_find_first
Date: Fri, 22 Oct 2021 04:19:22 +0000 [thread overview]
Message-ID: <5a3a7c84bfb94d26a2d6e88e86f6edda@baidu.com> (raw)
In-Reply-To: <20210930225850.GA6434@lespinasse.org>
Ping
-Li
> On Thu, Sep 30, 2021 at 03:16:36PM +0800, Li RongQing wrote:
> > the variable c is int type, so change the following condition
> >
> > if (c <= 0) {
> >
> > }
> > else if (c > 0) {
> >
> > }
> > as:
> > if (c <= 0) {
> >
> > }
> > else {
> >
> > }
> >
> > Spotted-by: Michel Lespinasse <<michel@lespinasse.org>>
> > Signed-off-by: Li RongQing <lirongqing@baidu.com>
> > ---
> > include/linux/rbtree.h | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index
> > 235047d..d5ac8f7 100644
> > --- a/include/linux/rbtree.h
> > +++ b/include/linux/rbtree.h
> > @@ -294,7 +294,7 @@ static inline void rb_replace_node_cached(struct
> rb_node *victim,
> > if (!c)
> > match = node;
> > node = node->rb_left;
> > - } else if (c > 0) {
> > + } else {
> > node = node->rb_right;
> > }
> > }
>
> Looks good to me, thanks for the fix.
>
> Reviewed-by: Michel Lespinasse <michel@lespinasse.org>
>
> --
> Michel "walken" Lespinasse
prev parent reply other threads:[~2021-10-22 4:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-30 7:16 Li RongQing
2021-09-30 22:58 ` Michel Lespinasse
2021-10-22 4:19 ` Li,Rongqing [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=5a3a7c84bfb94d26a2d6e88e86f6edda@baidu.com \
--to=lirongqing@baidu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michel@lespinasse.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®