* [PATCH 1/1] block/blk-throttle.c: fix return of 0/1 with return type bool
@ 2014-05-02 16:28 Fabian Frederick
2014-05-02 17:38 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-05-02 16:28 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Jens Axboe
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>
---
block/blk-throttle.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 033745c..366b1d8 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;
}
/*
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] block/blk-throttle.c: fix return of 0/1 with return type bool
2014-05-02 16:28 [PATCH 1/1] block/blk-throttle.c: fix return of 0/1 with return type bool Fabian Frederick
@ 2014-05-02 17:38 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2014-05-02 17:38 UTC (permalink / raw)
To: Fabian Frederick, linux-kernel; +Cc: akpm
On 05/02/2014 10:28 AM, Fabian Frederick wrote:
> Fix 4 coccinelle warnings.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-02 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-02 16:28 [PATCH 1/1] block/blk-throttle.c: fix return of 0/1 with return type bool Fabian Frederick
2014-05-02 17:38 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.