diff --git a/[refs] b/[refs] index 8b65d8e6e827..31a6f4bbd8f8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a9947bf7a3a14d2107cb9a27279fc8f463370a9 +refs/heads/master: 238628edb6cd427454fb54994e2605e191bfc26a diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index f69c4a5361e3..9bb7489ee645 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -2648,9 +2648,9 @@ asmlinkage void __sched schedule(void) schedstat_inc(rq, sched_cnt); now = sched_clock(); - if (likely((long long)now - prev->timestamp < NS_MAX_SLEEP_AVG)) { + if (likely((long long)(now - prev->timestamp) < NS_MAX_SLEEP_AVG)) { run_time = now - prev->timestamp; - if (unlikely((long long)now - prev->timestamp < 0)) + if (unlikely((long long)(now - prev->timestamp) < 0)) run_time = 0; } else run_time = NS_MAX_SLEEP_AVG; @@ -2728,7 +2728,7 @@ asmlinkage void __sched schedule(void) if (!rt_task(next) && next->activated > 0) { unsigned long long delta = now - next->timestamp; - if (unlikely((long long)now - next->timestamp < 0)) + if (unlikely((long long)(now - next->timestamp) < 0)) delta = 0; if (next->activated == 1)