diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-05-02 18:28:17 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-05-02 11:38:03 -0600 |
commit | 5cf8c2277576fcc48966b105bb42782d7929fc48 (patch) | |
tree | 29245d8c191194a6f0a7e3533154e2b1bea997e4 | |
parent | 5214e33c8efee16502b8a0549a3c24e21af458f7 (diff) | |
download | linux-5cf8c2277576fcc48966b105bb42782d7929fc48.tar.gz linux-5cf8c2277576fcc48966b105bb42782d7929fc48.tar.bz2 linux-5cf8c2277576fcc48966b105bb42782d7929fc48.zip |
block/blk-throttle.c: fix return of 0/1 with return type bool
Fix 4 coccinelle warnings.
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | block/blk-throttle.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 680a0cc116dd..9353b4683359 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -744,7 +744,7 @@ static inline void throtl_extend_slice(struct throtl_grp *tg, bool rw, static bool throtl_slice_used(struct throtl_grp *tg, bool rw) { if (time_in_range(jiffies, tg->slice_start[rw], tg->slice_end[rw])) - return 0; + return false; return 1; } @@ -842,7 +842,7 @@ static bool tg_with_in_iops_limit(struct throtl_grp *tg, struct bio *bio, if (tg->io_disp[rw] + 1 <= io_allowed) { if (wait) *wait = 0; - return 1; + return true; } /* Calc approx time to dispatch */ @@ -880,7 +880,7 @@ static bool tg_with_in_bps_limit(struct throtl_grp *tg, struct bio *bio, if (tg->bytes_disp[rw] + bio->bi_iter.bi_size <= bytes_allowed) { if (wait) *wait = 0; - return 1; + return true; } /* Calc approx time to dispatch */ @@ -923,7 +923,7 @@ static bool tg_may_dispatch(struct throtl_grp *tg, struct bio *bio, if (tg->bps[rw] == -1 && tg->iops[rw] == -1) { if (wait) *wait = 0; - return 1; + return true; } /* |