From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98E2CC55178 for ; Sun, 1 Nov 2020 05:21:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53071222EC for ; Sun, 1 Nov 2020 05:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbgKAFVP (ORCPT ); Sun, 1 Nov 2020 01:21:15 -0400 Received: from mga17.intel.com ([192.55.52.151]:16422 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726117AbgKAFVO (ORCPT ); Sun, 1 Nov 2020 01:21:14 -0400 IronPort-SDR: i7s71Jn+vjY1eh0Y0KjPpqUkt5NfM5tEn9e/O1H+ZgjeAeO3Ef0UNKAsC52e54gCejqjRagnVs qGG/Uwxjrilw== X-IronPort-AV: E=McAfee;i="6000,8403,9791"; a="148626987" X-IronPort-AV: E=Sophos;i="5.77,440,1596524400"; d="scan'208";a="148626987" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2020 22:21:13 -0700 IronPort-SDR: tN+yEUt10NvZimWqE6c6h0V94RY4AEv88O+WBSDzK1S76weZKWPjRKYVW3tV0/3cGU1XWaMrkE +8+tLtIhHnCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,440,1596524400"; d="scan'208";a="362268515" Received: from lkp-server02.sh.intel.com (HELO 7e23a4084293) ([10.239.97.151]) by FMSMGA003.fm.intel.com with ESMTP; 31 Oct 2020 22:21:12 -0700 Received: from kbuild by 7e23a4084293 with local (Exim 4.92) (envelope-from ) id 1kZ5nj-00001E-Ey; Sun, 01 Nov 2020 05:21:11 +0000 Date: Sun, 1 Nov 2020 13:20:51 +0800 From: kernel test robot To: Josef Bacik Cc: kbuild-all@lists.01.org, David Sterba , Nikolay Borisov , Chris Mason , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: fix boolreturn.cocci warnings Message-ID: <20201101052051.GA16691@39d425248bd2> References: <202011011347.QVW3uluR-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202011011347.QVW3uluR-lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: kernel test robot 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 Signed-off-by: kernel test robot --- 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));