lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221102114354.162-4-Yuwei.Guan@zeekrlife.com>
Date:   Wed,  2 Nov 2022 19:43:52 +0800
From:   Yuwei Guan <ssawgyw@...il.com>
To:     paolo.valente@...aro.org, axboe@...nel.dk, tj@...nel.org,
        josef@...icpanda.com
Cc:     linux-block@...r.kernel.org, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, Yuwei.Guan@...krlife.com
Subject: [PATCH 3/5] block, bfq: remove redundant max_t() in bfq_bfqq_charge_time()

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@...krlife.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ