Content-Type: multipart/mixed; boundary="===============7211415868318681013==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] objtool, perf: fix boolreturn.cocci warnings Date: Fri, 10 Jan 2020 13:42:24 +0100 Message-ID: List-Id: --===============7211415868318681013== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: 4864b0702653 ("objtool, perf: Fix GCC 8 -Wrestrict error") CC: Josh Poimboeuf Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 head: 58ce54880a03d9c27327434ba15281f5a7139671 commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix= GCC 8 -Wrestrict error :::::: branch date: 29 hours ago :::::: commit date: 9 weeks ago blk-throttle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -597,7 +597,7 @@ static bool throtl_slice_used(struct thr if (time_in_range(jiffies, tg->slice_start[rw], tg->slice_end[rw])) return false; - return 1; + return true; } /* Trim the used slices and adjust slice start accordingly */ @@ -706,7 +706,7 @@ static bool tg_with_in_iops_limit(struct if (wait) *wait =3D jiffy_wait; - return 0; + return false; } static bool tg_with_in_bps_limit(struct throtl_grp *tg, struct bio *bio, @@ -748,7 +748,7 @@ static bool tg_with_in_bps_limit(struct jiffy_wait =3D jiffy_wait + (jiffy_elapsed_rnd - jiffy_elapsed); if (wait) *wait =3D jiffy_wait; - return 0; + return false; } /* @@ -795,7 +795,7 @@ static bool tg_may_dispatch(struct throt tg_with_in_iops_limit(tg, bio, &iops_wait)) { if (wait) *wait =3D 0; - return 1; + return true; } max_wait =3D max(bps_wait, iops_wait); @@ -806,7 +806,7 @@ static bool tg_may_dispatch(struct throt if (time_before(tg->slice_end[rw], jiffies + max_wait)) throtl_extend_slice(tg, rw, jiffies + max_wait); - return 0; + return false; } static void throtl_charge_bio(struct throtl_grp *tg, struct bio *bio) --===============7211415868318681013==--