objtool, perf: fix boolreturn.cocci warnings
Subsystems (2)
PATCH 1/1 objtool, perf: fix boolreturn.cocci warnings
From: kbuild test robot <[email protected]>
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 <[email protected]>
Signed-off-by kbuild test robot <[email protected]>
Signed-off-by Julia Lawall <[email protected]>
---
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(-)
block/blk-throttle.c +5 -5
@@ -597,7 +597,7 @@ static bool throtl_slice_used(struct thrif (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(structif (wait) *wait = 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 = jiffy_wait + (jiffy_elapsed_rnd - jiffy_elapsed);if (wait) *wait = 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 =0 ; -return 1 ; +return true; } max_wait =max (bps_wait, iops_wait);
@@ -806,7 +806,7 @@ static bool tg_may_dispatch(struct throtif (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)