Skip to content
Commit f26d2973 authored by Patrick Bellasi's avatar Patrick Bellasi Committed by Dietmar Eggemann
Browse files

sched/fair: always used unsigned long for utilization



Utilization and capacity are tracked as unsigned long, however some
functions using them return an int which is ultimately assigned back to
unsigned long variables.

Since there is not scope on using a different and signed type, this
consolidate the signature of functions returning utilization to always
use the native type.
As well as improving code consistency this is expected also benefits
code paths where utilizations should be clamped by avoiding further type
conversions or ugly type casts.

Signed-off-by: default avatarPatrick Bellasi <patrick.bellasi@arm.com>
Reviewed-by: Chris Redpath's avatarChris Redpath <chris.redpath@arm.com>
Reviewed-by: default avatarBrendan Jackman <brendan.jackman@arm.com>
Reviewed-by: Dietmar Eggemann's avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Morten Rasmussen <morten.rasmussen@arm.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: linux-kernel@vger.kernel.org

---
Changes v1->v2:
 - rebase on top of v4.15-rc2
 - tested that overhauled PELT code does not affect the util_est
parent ce06479e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment