Revert "ktime: Simplify ktime_compare implementation"

Thierry bisected boot failures to this simplification commit.

Reverts: 3f1d472055 ("ktime: Simplify ktime_compare implementation")
Reported-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mariusz Skamra <mariuszx.skamra@intel.com>
This commit is contained in:
Thomas Gleixner 2017-06-26 10:24:27 +02:00
parent b7dcc4eacc
commit 9902747ec5

View File

@ -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;
}
/**