summaryrefslogtreecommitdiff
path: root/kernel/sched/hmp.c
diff options
context:
space:
mode:
authorOlav Haugan <ohaugan@codeaurora.org>2017-01-13 17:04:36 -0800
committerOlav Haugan <ohaugan@codeaurora.org>2017-01-13 17:06:01 -0800
commit68b55fe985df8e03739a5dfe72dd3ce1903c5703 (patch)
tree359e9acd79051335fa0354345fd5753cf28b8f68 /kernel/sched/hmp.c
parent2dc96b1cbbdcf5aef3780696708012d55fec57f2 (diff)
sched: Initialize variables
Initialize variable at definition to avoid compiler warning when compiling with CONFIG_OPTIMIZE_FOR_SIZE=n. Change-Id: Ibd201877b2274c70ced9d7240d0e527bc77402f3 Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'kernel/sched/hmp.c')
-rw-r--r--kernel/sched/hmp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index 180e2fcf785b..e637d27ae0be 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -2274,7 +2274,7 @@ static void update_cpu_busy_time(struct task_struct *p, struct rq *rq,
bool new_task;
struct related_thread_group *grp;
int cpu = rq->cpu;
- u32 old_curr_window;
+ u32 old_curr_window = p->ravg.curr_window;
new_window = mark_start < window_start;
if (new_window) {
@@ -2335,8 +2335,6 @@ static void update_cpu_busy_time(struct task_struct *p, struct rq *rq,
* task or exiting tasks.
*/
if (!is_idle_task(p) && !exiting_task(p)) {
- old_curr_window = p->ravg.curr_window;
-
if (new_window)
rollover_task_window(p, full_window);
}