Skip to content

Commit ef8df97

Browse files
Vincent DonnefortPeter Zijlstra
authored andcommitted
sched/fair: Cleanup task_util and capacity type
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> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20211207095755.859972-1-vincent.donnefort@arm.com
1 parent 9b58e97 commit ef8df97

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

kernel/sched/fair.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4070,7 +4070,8 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,
40704070
trace_sched_util_est_se_tp(&p->se);
40714071
}
40724072

4073-
static inline int task_fits_capacity(struct task_struct *p, long capacity)
4073+
static inline int task_fits_capacity(struct task_struct *p,
4074+
unsigned long capacity)
40744075
{
40754076
return fits_capacity(uclamp_task_util(p), capacity);
40764077
}
@@ -6345,7 +6346,7 @@ select_idle_capacity(struct task_struct *p, struct sched_domain *sd, int target)
63456346
return best_cpu;
63466347
}
63476348

6348-
static inline bool asym_fits_capacity(int task_util, int cpu)
6349+
static inline bool asym_fits_capacity(unsigned long task_util, int cpu)
63496350
{
63506351
if (static_branch_unlikely(&sched_asym_cpucapacity))
63516352
return fits_capacity(task_util, capacity_of(cpu));

0 commit comments

Comments
 (0)