summaryrefslogtreecommitdiff
path: root/block/bfq-wf2q.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2022-11-02 10:25:42 +0800
committerJens Axboe <axboe@kernel.dk>2022-11-01 20:10:55 -0600
commitaa625117d6f67e33fab280358855fdd332bb20ab (patch)
tree12ad0ff4e9ac82eb44da77d96318721e002b90d2 /block/bfq-wf2q.c
parent918fdea3884ca8de93bd0e8ad02545eb8e3695d6 (diff)
block, bfq: don't declare 'bfqd' as type 'void *' in bfq_group
Prevent unnecessary format conversion for bfqg->bfqd in multiple places. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Paolo Valente <paolo.valente@unimore.it> Link: https://lore.kernel.org/r/20221102022542.3621219-6-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bfq-wf2q.c')
-rw-r--r--block/bfq-wf2q.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
index 4d4b84e7bf3e..b02b53658ed4 100644
--- a/block/bfq-wf2q.c
+++ b/block/bfq-wf2q.c
@@ -222,9 +222,8 @@ static void bfq_inc_active_entities(struct bfq_entity *entity)
{
struct bfq_sched_data *sd = entity->sched_data;
struct bfq_group *bfqg = container_of(sd, struct bfq_group, sched_data);
- struct bfq_data *bfqd = (struct bfq_data *)bfqg->bfqd;
- if (bfqg != bfqd->root_group)
+ if (bfqg != bfqg->bfqd->root_group)
bfqg->active_entities++;
}
@@ -232,9 +231,8 @@ static void bfq_dec_active_entities(struct bfq_entity *entity)
{
struct bfq_sched_data *sd = entity->sched_data;
struct bfq_group *bfqg = container_of(sd, struct bfq_group, sched_data);
- struct bfq_data *bfqd = (struct bfq_data *)bfqg->bfqd;
- if (bfqg != bfqd->root_group)
+ if (bfqg != bfqg->bfqd->root_group)
bfqg->active_entities--;
}