mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
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:
parent
b7dcc4eacc
commit
9902747ec5
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user