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


Groups > linux.kernel > #1681117 > unrolled thread

[PATCH] bio-integrity: fix boolreturn.cocci warnings

Started bykbuild test robot <fengguang.wu@intel.com>
First post2017-07-04 20:20 +0200
Last post2017-07-05 00:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] bio-integrity: fix boolreturn.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2017-07-04 20:20 +0200
    Re: [PATCH] bio-integrity: fix boolreturn.cocci warnings Jens Axboe <axboe@kernel.dk> - 2017-07-05 00:20 +0200

#1681117 — [PATCH] bio-integrity: fix boolreturn.cocci warnings

Fromkbuild test robot <fengguang.wu@intel.com>
Date2017-07-04 20:20 +0200
Subject[PATCH] bio-integrity: fix boolreturn.cocci warnings
Message-ID<tZAAy-3tZ-13@gated-at.bofh.it>
block/bio-integrity.c:318:10-11: WARNING: return of 0/1 in function 'bio_integrity_prep' 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

Fixes: e23947bd76f0 ("bio-integrity: fold bio_integrity_enabled to bio_integrity_prep")
CC: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 bio-integrity.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -315,7 +315,7 @@ bool bio_integrity_prep(struct bio *bio)
 					     bytes, offset);
 
 		if (ret == 0)
-			return 0;
+			return false;
 
 		if (ret < bytes)
 			break;

[toc] | [next] | [standalone]


#1681203

FromJens Axboe <axboe@kernel.dk>
Date2017-07-05 00:20 +0200
Message-ID<tZEkN-5Ye-3@gated-at.bofh.it>
In reply to#1681117
On 07/04/2017 12:14 PM, kbuild test robot wrote:
> block/bio-integrity.c:318:10-11: WARNING: return of 0/1 in function 'bio_integrity_prep' 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

Thanks, applied.

-- 
Jens Axboe

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web