archive mirror
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <>
To: Alexander Viro <>
	"Gustavo A. R. Silva" <>
Subject: [PATCH] fs: buffer: use true and false for boolean values
Date: Wed, 1 Aug 2018 19:47:14 -0500	[thread overview]
Message-ID: <> (raw)

Return statements in functions returning bool should use true or false
instead of an integer value.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <>
 fs/buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index ebf78ab..bef8ade 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1415,10 +1415,10 @@ static bool has_bh_in_lru(int cpu, void *dummy)
 	for (i = 0; i < BH_LRU_SIZE; i++) {
 		if (b->bhs[i])
-			return 1;
+			return true;
-	return 0;
+	return false;
 void invalidate_bh_lrus(void)

                 reply	other threads:[~2018-08-02  0:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).