From: Thomas Gleixner Date: Mon, 26 Jun 2017 08:24:27 +0000 (+0200) Subject: Revert "ktime: Simplify ktime_compare implementation" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9902747ec57d11b27c98e53d66112ecceed43c82;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Revert "ktime: Simplify ktime_compare implementation" Thierry bisected boot failures to this simplification commit. Reverts: 3f1d472055bb ("ktime: Simplify ktime_compare implementation") Reported-by: Thierry Reding Signed-off-by: Thomas Gleixner Cc: Mariusz Skamra --- diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 04817b1ca019..0c8bd45c8206 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -108,7 +108,11 @@ static inline ktime_t timeval_to_ktime(struct timeval tv) */ static inline int ktime_compare(const ktime_t cmp1, const ktime_t cmp2) { - return ktime_sub(cmp1, cmp2); + if (cmp1 < cmp2) + return -1; + if (cmp1 > cmp2) + return 1; + return 0; } /**