All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] objtool, perf: fix boolreturn.cocci warnings
@ 2020-01-10 12:42 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2020-01-10 12:42 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2020 bytes --]

From: kbuild test robot <lkp@intel.com>

 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 <jpoimboe@redhat.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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 = 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 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-10 12:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10 12:42 [PATCH] objtool, perf: fix boolreturn.cocci warnings Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.