summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2005-04-18 10:58:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-18 10:58:36 -0700
commit238628edb6cd427454fb54994e2605e191bfc26a (patch)
tree3225899173a2103cb7532551477d5c69e030f0ee /kernel
parent9a9947bf7a3a14d2107cb9a27279fc8f463370a9 (diff)
[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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index f69c4a5361e..9bb7489ee64 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2648,9 +2648,9 @@ need_resched_nonpreemptible:
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 @@ go_idle:
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)