From: Jason A. Donenfeld Date: Tue, 10 May 2022 13:20:42 +0000 (+0200) Subject: random: use proper jiffies comparison macro X-Git-Tag: v5.15.73~3990 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac0172992c9427b84d17d9f89dbbeb38e4005eaa;p=platform%2Fkernel%2Flinux-rpi.git random: use proper jiffies comparison macro commit 8a5b8a4a4ceb353b4dd5bafd09e2b15751bcdb51 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/random.c b/drivers/char/random.c index c40b2d9..328e847 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -326,7 +326,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); } /*