From: Peter Zijlstra Date: Mon, 15 Oct 2007 15:00:11 +0000 (+0200) Subject: sched: max_vruntime() simplification X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=368059a977871def0f88a92eefb6ecc1f7b6132f;p=linux-beck.git sched: max_vruntime() simplification max_vruntime() simplification. Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 2bd9625fa62d..91664d665c0f 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -117,8 +117,8 @@ static inline struct task_struct *task_of(struct sched_entity *se) static inline u64 max_vruntime(u64 min_vruntime, u64 vruntime) { - if ((vruntime > min_vruntime) || - (min_vruntime > (1ULL << 61) && vruntime < (1ULL << 50))) + s64 delta = (s64)(vruntime - min_vruntime); + if (delta > 0) min_vruntime = vruntime; return min_vruntime;