[PATCH] sched: fix signed comparisons of long long

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Ingo Molnar and committed by Linus Torvalds 238628ed 9a9947bf

+3 -3
+3 -3
kernel/sched.c
··· 2648 2649 schedstat_inc(rq, sched_cnt); 2650 now = sched_clock(); 2651 - if (likely((long long)now - prev->timestamp < NS_MAX_SLEEP_AVG)) { 2652 run_time = now - prev->timestamp; 2653 - if (unlikely((long long)now - prev->timestamp < 0)) 2654 run_time = 0; 2655 } else 2656 run_time = NS_MAX_SLEEP_AVG; ··· 2728 2729 if (!rt_task(next) && next->activated > 0) { 2730 unsigned long long delta = now - next->timestamp; 2731 - if (unlikely((long long)now - next->timestamp < 0)) 2732 delta = 0; 2733 2734 if (next->activated == 1)
··· 2648 2649 schedstat_inc(rq, sched_cnt); 2650 now = sched_clock(); 2651 + if (likely((long long)(now - prev->timestamp) < NS_MAX_SLEEP_AVG)) { 2652 run_time = now - prev->timestamp; 2653 + if (unlikely((long long)(now - prev->timestamp) < 0)) 2654 run_time = 0; 2655 } else 2656 run_time = NS_MAX_SLEEP_AVG; ··· 2728 2729 if (!rt_task(next) && next->activated > 0) { 2730 unsigned long long delta = now - next->timestamp; 2731 + if (unlikely((long long)(now - next->timestamp) < 0)) 2732 delta = 0; 2733 2734 if (next->activated == 1)