diff mbox

block: fix boolreturn.cocci warnings

Message ID 20160702101741.GA101651@lkp-sb04 (mailing list archive)
State New, archived
Headers show

Commit Message

kernel test robot July 2, 2016, 10:17 a.m. UTC
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@google.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 elevator.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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