Skip to content

Commit 337366e

Browse files
YuKuai-huaweiaxboe
authored andcommitted
block, bfq: replace 0/1 with false/true in bic apis
Just to make the code a litter cleaner, there are no functional changes. Signed-off-by: Yu Kuai <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 452af7d commit 337366e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

block/bfq-cgroup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,15 +728,15 @@ static void __bfq_bic_change_cgroup(struct bfq_data *bfqd,
728728
struct bfq_io_cq *bic,
729729
struct bfq_group *bfqg)
730730
{
731-
struct bfq_queue *async_bfqq = bic_to_bfqq(bic, 0);
732-
struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, 1);
731+
struct bfq_queue *async_bfqq = bic_to_bfqq(bic, false);
732+
struct bfq_queue *sync_bfqq = bic_to_bfqq(bic, true);
733733
struct bfq_entity *entity;
734734

735735
if (async_bfqq) {
736736
entity = &async_bfqq->entity;
737737

738738
if (entity->sched_data != &bfqg->sched_data) {
739-
bic_set_bfqq(bic, NULL, 0);
739+
bic_set_bfqq(bic, NULL, false);
740740
bfq_release_process_ref(bfqd, async_bfqq);
741741
}
742742
}
@@ -772,7 +772,7 @@ static void __bfq_bic_change_cgroup(struct bfq_data *bfqd,
772772
*/
773773
bfq_put_cooperator(sync_bfqq);
774774
bfq_release_process_ref(bfqd, sync_bfqq);
775-
bic_set_bfqq(bic, NULL, 1);
775+
bic_set_bfqq(bic, NULL, true);
776776
}
777777
}
778778
}

block/bfq-iosched.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,7 +3114,7 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic,
31143114
/*
31153115
* Merge queues (that is, let bic redirect its requests to new_bfqq)
31163116
*/
3117-
bic_set_bfqq(bic, new_bfqq, 1);
3117+
bic_set_bfqq(bic, new_bfqq, true);
31183118
bfq_mark_bfqq_coop(new_bfqq);
31193119
/*
31203120
* new_bfqq now belongs to at least two bics (it is a shared queue):
@@ -6562,7 +6562,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)
65626562
return bfqq;
65636563
}
65646564

6565-
bic_set_bfqq(bic, NULL, 1);
6565+
bic_set_bfqq(bic, NULL, true);
65666566

65676567
bfq_put_cooperator(bfqq);
65686568

0 commit comments

Comments
 (0)