Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1435784

[PATCH] block: fix boolreturn.cocci warnings

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject [PATCH] block: fix boolreturn.cocci warnings
Date 2016-07-02 12:20 +0200
Message-ID <rQqbM-2mj-7@gated-at.bofh.it> (permalink)
References <rQqbM-2mj-1@gated-at.bofh.it> <rQjMZ-6Ox-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] block: do not merge requests without consulting with io scheduler Tahsin Erdogan <tahsin@google.com> - 2016-07-02 05:30 +0200
  Re: [PATCH] block: do not merge requests without consulting with io  scheduler kbuild test robot <lkp@intel.com> - 2016-07-02 12:20 +0200
  [PATCH] block: fix boolreturn.cocci warnings kbuild test robot <lkp@intel.com> - 2016-07-02 12:20 +0200

csiph-web