Commit 8a5b8a4a authored by Jason A. Donenfeld's avatar Jason A. Donenfeld

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: default avatarJason A. Donenfeld <Jason@zx2c4.com>
parent cc1e127b
...@@ -325,7 +325,7 @@ static bool crng_has_old_seed(void) ...@@ -325,7 +325,7 @@ static bool crng_has_old_seed(void)
interval = max_t(unsigned int, CRNG_RESEED_START_INTERVAL, interval = max_t(unsigned int, CRNG_RESEED_START_INTERVAL,
(unsigned int)uptime / 2 * HZ); (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);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment