From: Manuel Schölling Date: Thu, 22 May 2014 17:45:23 +0000 (+0200) Subject: sched/fair: Use time_after() in record_wakee() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2538d960d0c74cdc639f05723e04a67aed1efdf9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sched/fair: Use time_after() in record_wakee() To be future-proof and for better readability the time comparisons are modified to use time_after() instead of plain, error-prone math. Signed-off-by: Manuel Schölling Signed-off-by: Peter Zijlstra Cc: Linus Torvalds Link: http://lkml.kernel.org/r/1400780723-24626-1-git-send-email-manuel.schoelling@gmx.de Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7a0c000b6005..c63dde984956 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4066,7 +4066,7 @@ static void record_wakee(struct task_struct *p) * about the boundary, really active task won't care * about the loss. */ - if (jiffies > current->wakee_flip_decay_ts + HZ) { + if (time_after(jiffies, current->wakee_flip_decay_ts + HZ)) { current->wakee_flips >>= 1; current->wakee_flip_decay_ts = jiffies; }