diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-06-26 10:24:27 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-26 10:39:40 +0200 |
commit | 9902747ec57d11b27c98e53d66112ecceed43c82 (patch) | |
tree | 46fd36e5f653b93763feafbd05d29ae4cc6127b2 /include | |
parent | clocksource/drivers: Fix uninitialized variable use in timer_of_init (diff) | |
download | linux-9902747ec57d11b27c98e53d66112ecceed43c82.tar.xz linux-9902747ec57d11b27c98e53d66112ecceed43c82.zip |
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 <thierry.reding@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mariusz Skamra <mariuszx.skamra@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ktime.h | 6 |
1 files changed, 5 insertions, 1 deletions
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; } /** |