From: kernel test robot <lkp@intel.com>
To: Josef Bacik <josef@toxicpanda.com>
Cc: kbuild-all@lists.01.org, David Sterba <dsterba@suse.com>,
Nikolay Borisov <nborisov@suse.com>,
Chris Mason <chris.mason@fusionio.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] btrfs: fix boolreturn.cocci warnings
Date: Sun, 1 Nov 2020 13:20:51 +0800 [thread overview]
Message-ID: <20201101052051.GA16691@39d425248bd2> (raw)
In-Reply-To: <202011011347.QVW3uluR-lkp@intel.com>
From: kernel test robot <lkp@intel.com>
fs/btrfs/space-info.c:810:9-10: WARNING: return of 0/1 in function 'need_preemptive_reclaim' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
Fixes: fc96d3794eb2 ("btrfs: rename need_do_async_reclaim")
CC: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/kdave/btrfs-devel.git for-next-20201030
head: 757db2d191a0eb51ffb9acf023e31393d731b0a9
commit: fc96d3794eb2f38f91dc1647ab55967190b68482 [14921/14978] btrfs: rename need_do_async_reclaim
space-info.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -807,10 +807,10 @@ static inline bool need_preemptive_recla
/* If we're just plain full then async reclaim just slows us down. */
if ((space_info->bytes_used + space_info->bytes_reserved) >= thresh)
- return 0;
+ return false;
if (!btrfs_calc_reclaim_metadata_size(fs_info, space_info))
- return 0;
+ return false;
return (used >= thresh && !btrfs_fs_closing(fs_info) &&
!test_bit(BTRFS_FS_STATE_REMOUNTING, &fs_info->fs_state));
next parent reply other threads:[~2020-11-01 5:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202011011347.QVW3uluR-lkp@intel.com>
2020-11-01 5:20 ` kernel test robot [this message]
2020-12-15 18:13 ` [PATCH] btrfs: fix boolreturn.cocci warnings David Sterba
[not found] <202101301416.gmP3XmvI-lkp@intel.com>
2021-01-30 6:49 ` kernel test robot
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=20201101052051.GA16691@39d425248bd2 \
--to=lkp@intel.com \
--cc=chris.mason@fusionio.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nborisov@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).