Thierry bisected boot failures to this simplification commit.
Reverts:
3f1d472055bb ("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>
*/
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;
}
/**