From: Park Bumgyu Date: Thu, 14 Jun 2018 00:43:16 +0000 (+0900) Subject: sched: ems: fix return type of task_util. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab828f99afde2fe58623e7db31ece9b170f67bb1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sched: ems: fix return type of task_util. The variable type of util_avg is unsigned long. Fix return type of task util to avoid data loss. Change-Id: I463b9fa65f018f4d98804df6f3c62fbbb6ff0951 Signed-off-by: Park Bumgyu --- diff --git a/kernel/sched/ems/core.c b/kernel/sched/ems/core.c index e13179ed3e3e..762266e71c0b 100644 --- a/kernel/sched/ems/core.c +++ b/kernel/sched/ems/core.c @@ -13,7 +13,7 @@ #include "ems.h" #include "../sched.h" -int task_util(struct task_struct *p) +unsigned long task_util(struct task_struct *p) { if (rt_task(p)) return p->rt.avg.util_avg; diff --git a/kernel/sched/ems/ems.h b/kernel/sched/ems/ems.h index 41f83a66dc0c..f558d3c58cde 100644 --- a/kernel/sched/ems/ems.h +++ b/kernel/sched/ems/ems.h @@ -35,7 +35,7 @@ static inline int prefer_idle_cpu(struct task_struct *p) { return -1; } static inline int group_balancing(struct task_struct *p) { return -1; } #endif -extern int task_util(struct task_struct *p); +extern unsigned long task_util(struct task_struct *p); extern int cpu_util_wake(int cpu, struct task_struct *p); extern unsigned long task_util_est(struct task_struct *p); extern inline unsigned int get_cpu_mips(unsigned int cpu);