summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-05-10 16:20:42 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2022-05-18 16:53:53 +0300
commit8a5b8a4a4ceb353b4dd5bafd09e2b15751bcdb51 (patch)
treeca09673ff4a855ed4c6d439748e1c955af3aed57 /drivers/char
parentcc1e127bfa95b5fb2f9307e7168bf8b2b45b4c5e (diff)
downloadlinux-8a5b8a4a4ceb353b4dd5bafd09e2b15751bcdb51.tar.xz
random: use proper jiffies comparison macro
This expands to exactly the same code that it replaces, but makes things consistent by using the same macro for jiffy comparisons throughout. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 3860d534cf05..9024aeba2d28 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -325,7 +325,7 @@ static bool crng_has_old_seed(void)
interval = max_t(unsigned int, CRNG_RESEED_START_INTERVAL,
(unsigned int)uptime / 2 * HZ);
}
- return time_after(jiffies, READ_ONCE(base_crng.birth) + interval);
+ return time_is_before_jiffies(READ_ONCE(base_crng.birth) + interval);
}
/*