From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4993609146861382678==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] scripts/dtc: fix boolreturn.cocci warnings Date: Fri, 21 May 2021 02:23:06 +0800 Message-ID: <20210520182306.GA34642@ad678c5af442> In-Reply-To: <202105210256.1Q2XDf1M-lkp@intel.com> List-Id: --===============4993609146861382678== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot fs/nfsd/nfsfh.c:437:10-11: WARNING: return of 0/1 in function 'fsid_type_ok= _for_exp' 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: 8214bf079208 ("scripts/dtc: Export YYLOC global declaration") Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://android.googlesource.com/kernel/goldfish android-3.18 head: dd54b61f1458c03f68fc019b4874d98f2f0ae3a5 commit: 8214bf079208b146e63cd0a3ce0ed335a87ce7b3 [396/1051] scripts/dtc: Ex= port YYLOC global declaration :::::: branch date: 5 weeks ago :::::: commit date: 3 months ago nfsfh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -434,7 +434,7 @@ static bool fsid_type_ok_for_exp(u8 fsid switch (fsid_type) { case FSID_DEV: if (!old_valid_dev(exp_sb(exp)->s_dev)) - return 0; + return false; /* FALL THROUGH */ case FSID_MAJOR_MINOR: case FSID_ENCODE_DEV: @@ -444,13 +444,13 @@ static bool fsid_type_ok_for_exp(u8 fsid case FSID_UUID8: case FSID_UUID16: if (!is_root_export(exp)) - return 0; + return false; /* fall through */ case FSID_UUID4_INUM: case FSID_UUID16_INUM: return exp->ex_uuid !=3D NULL; } - return 1; + return true; } = =20 --===============4993609146861382678==--