diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-06-26 04:24:27 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-26 04:39:40 -0400 |
commit | 9902747ec57d11b27c98e53d66112ecceed43c82 (patch) | |
tree | 46fd36e5f653b93763feafbd05d29ae4cc6127b2 | |
parent | b7dcc4eacc45263ac5d3a0bd78c64e9ff7c94c13 (diff) |
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>
-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) | |||
108 | */ | 108 | */ |
109 | static inline int ktime_compare(const ktime_t cmp1, const ktime_t cmp2) | 109 | static inline int ktime_compare(const ktime_t cmp1, const ktime_t cmp2) |
110 | { | 110 | { |
111 | return ktime_sub(cmp1, cmp2); | 111 | if (cmp1 < cmp2) |
112 | return -1; | ||
113 | if (cmp1 > cmp2) | ||
114 | return 1; | ||
115 | return 0; | ||
112 | } | 116 | } |
113 | 117 | ||
114 | /** | 118 | /** |