Commit c1e44756fdb7b363fd22cb5514dced40752e36c5
Committed by
Jens Axboe
1 parent
f6f94e2ab1
Exists in
master
and in
4 other branches
cfq-iosched: do cleanup
Some functions should return boolean. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff
block/cfq-iosched.c
... | ... | @@ -637,11 +637,11 @@ |
637 | 637 | static inline bool cfq_slice_used(struct cfq_queue *cfqq) |
638 | 638 | { |
639 | 639 | if (cfq_cfqq_slice_new(cfqq)) |
640 | - return 0; | |
640 | + return false; | |
641 | 641 | if (time_before(jiffies, cfqq->slice_end)) |
642 | - return 0; | |
642 | + return false; | |
643 | 643 | |
644 | - return 1; | |
644 | + return true; | |
645 | 645 | } |
646 | 646 | |
647 | 647 | /* |
648 | 648 | |
... | ... | @@ -1892,10 +1892,10 @@ |
1892 | 1892 | * in their service tree. |
1893 | 1893 | */ |
1894 | 1894 | if (service_tree->count == 1 && cfq_cfqq_sync(cfqq)) |
1895 | - return 1; | |
1895 | + return true; | |
1896 | 1896 | cfq_log_cfqq(cfqd, cfqq, "Not idling. st->count:%d", |
1897 | 1897 | service_tree->count); |
1898 | - return 0; | |
1898 | + return false; | |
1899 | 1899 | } |
1900 | 1900 | |
1901 | 1901 | static void cfq_arm_slice_timer(struct cfq_data *cfqd) |
1902 | 1902 | |
1903 | 1903 | |
... | ... | @@ -2359,12 +2359,12 @@ |
2359 | 2359 | { |
2360 | 2360 | /* the queue hasn't finished any request, can't estimate */ |
2361 | 2361 | if (cfq_cfqq_slice_new(cfqq)) |
2362 | - return 1; | |
2362 | + return true; | |
2363 | 2363 | if (time_after(jiffies + cfqd->cfq_slice_idle * cfqq->dispatched, |
2364 | 2364 | cfqq->slice_end)) |
2365 | - return 1; | |
2365 | + return true; | |
2366 | 2366 | |
2367 | - return 0; | |
2367 | + return false; | |
2368 | 2368 | } |
2369 | 2369 | |
2370 | 2370 | static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq) |