Messages in this thread Patch in this message | | | From | Vincent Donnefort <> | Subject | [PATCH v3] sched/fair: cleanup task_util and capacity type | Date | Tue, 7 Dec 2021 09:57:55 +0000 |
| |
task_util and capacity are comparable unsigned long values. There is no need for an intermidiate implicit signed cast.
Signed-off-by: Vincent Donnefort <vincent.donnefort@arm.com>
--- v2 -> v3: * Drop "Fixes" tags. * Merge changes in one.
v1 -> v2: * Add task_fits_capacity missing unsigned ---
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 945d987246c5..26a88975f68a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4070,7 +4070,8 @@ static inline void util_est_update(struct cfs_rq *cfs_rq, trace_sched_util_est_se_tp(&p->se); } -static inline int task_fits_capacity(struct task_struct *p, long capacity) +static inline int task_fits_capacity(struct task_struct *p, + unsigned long capacity) { return fits_capacity(uclamp_task_util(p), capacity); } @@ -6346,7 +6347,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target) return best_cpu; } -static inline bool asym_fits_capacity(int task_util, int cpu) +static inline bool asym_fits_capacity(unsigned long task_util, int cpu) { if (static_branch_unlikely(&sched_asym_cpucapacity)) return fits_capacity(task_util, capacity_of(cpu)); -- 2.25.1
| |