[PATCH] block: fix boolreturn.cocci warnings
From: kbuild test robot
Date: Sat Jul 02 2016 - 06:14:10 EST
block/elevator.c:73:9-10: WARNING: return of 0/1 in function 'elv_bio_merge_ok' 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
CC: Tahsin Erdogan <tahsin@xxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---
elevator.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -70,12 +70,12 @@ static int elv_iosched_allow_bio_merge(s
bool elv_bio_merge_ok(struct request *rq, struct bio *bio)
{
if (!blk_rq_merge_ok(rq, bio))
- return 0;
+ return false;
if (!elv_iosched_allow_bio_merge(rq, bio))
- return 0;
+ return false;
- return 1;
+ return true;
}
EXPORT_SYMBOL(elv_bio_merge_ok);