From: Wan Jiabing <wanjiabing@vivo.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: jiabing.wan@qq.com, Wan Jiabing <wanjiabing@vivo.com>
Subject: [PATCH] lib: maple_tree: fix boolreturn.cocci warning
Date: Fri, 25 Feb 2022 14:31:01 +0800 [thread overview]
Message-ID: <20220225063101.891725-1-wanjiabing@vivo.com> (raw)
Fix following coccicheck warning:
./lib/maple_tree.c:4177:9-10: WARNING: return of 0/1 in function
mas_wr_append with return type bool.
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
lib/maple_tree.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index 5f7295ba0309..933483726b85 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -4174,7 +4174,7 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas)
mas->offset = new_end;
wr_mas->pivots[end] = mas->index - 1;
- return 1;
+ return true;
} else if ((mas->index == wr_mas->r_min) && (mas->last < wr_mas->r_max)) {
if (new_end < node_pivots)
wr_mas->pivots[new_end] = wr_mas->pivots[end];
@@ -4185,9 +4185,9 @@ static inline bool mas_wr_append(struct ma_wr_state *wr_mas)
wr_mas->pivots[end] = mas->last;
rcu_assign_pointer(wr_mas->slots[end], wr_mas->entry);
- return 1;
+ return true;
}
- return 0;
+ return false;
}
static inline void mas_wr_modify(struct ma_wr_state *wr_mas)
--
2.35.1
next reply other threads:[~2022-02-25 6:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-25 6:31 Wan Jiabing [this message]
2022-02-25 14:50 ` [PATCH] lib: maple_tree: fix boolreturn.cocci warning Liam Howlett
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=20220225063101.891725-1-wanjiabing@vivo.com \
--to=wanjiabing@vivo.com \
--cc=Liam.Howlett@oracle.com \
--cc=jiabing.wan@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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.