The "tot_serv_to_charge" is great than or equal to "entity->service", so no need to do max_t() again. Signed-off-by: Yuwei Guan <Yuwei.Guan@xxxxxxxxxxxxx> --- block/bfq-wf2q.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index 8fc3da4c23bb..3da08f4be633 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c @@ -867,8 +867,7 @@ void bfq_bfqq_charge_time(struct bfq_data *bfqd, struct bfq_queue *bfqq, if (tot_serv_to_charge > entity->budget) entity->budget = tot_serv_to_charge; - bfq_bfqq_served(bfqq, - max_t(int, 0, tot_serv_to_charge - entity->service)); + bfq_bfqq_served(bfqq, tot_serv_to_charge - entity->service); } static void bfq_update_fin_time_enqueue(struct bfq_entity *entity, -- 2.34.1