lkml.org 
[lkml]   [2016]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] block: fix boolreturn.cocci warnings
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(-)

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

\
 
 \ /
  Last update: 2016-07-02 13:01    [W:0.040 / U:7.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site