Skip to contentSkip to conversation

random: use proper jiffies comparison macro

PATCH New Jason A. Donenfeld 1 participant 1 message May 10, 2022 Random number driver

lore
Share & tools
lore

Jason A. Donenfeld

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 drivers/char/random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/random.c +1 -1
index 2f8559122dfa..b1ef334ed263 100644
@@ -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);
 }
 
 /*
Signature · 1 line
2.35.1