public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] crypto: jitterentropy - drop redundant delta check in jent_entropy_init
@ 2026-05-04  8:28 Thorsten Blum
  2026-05-04  8:28 ` [PATCH 2/2] crypto: jitterentropy - fix URL Thorsten Blum
  2026-05-04 11:47 ` [PATCH 1/2] crypto: jitterentropy - drop redundant delta check in jent_entropy_init Stephan Müller
  0 siblings, 2 replies; 4+ messages in thread
From: Thorsten Blum @ 2026-05-04  8:28 UTC (permalink / raw)
  To: Stephan Mueller, Herbert Xu, David S. Miller
  Cc: Thorsten Blum, linux-crypto, linux-kernel

Since start_time = end_time - delta, start_time can only equal end_time
when delta is 0, making the explicit end_time == start_time check
redundant. Remove it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 crypto/jitterentropy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/jitterentropy.c b/crypto/jitterentropy.c
index d5832caa8ab3..6ac0257e8e0a 100644
--- a/crypto/jitterentropy.c
+++ b/crypto/jitterentropy.c
@@ -775,7 +775,7 @@ int jent_entropy_init(unsigned int osr, unsigned int flags,
 		 * delta even when called shortly after each other -- this
 		 * implies that we also have a high resolution timer
 		 */
-		if (!delta || (end_time == start_time)) {
+		if (!delta) {
 			ret = JENT_ECOARSETIME;
 			goto out;
 		}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-04 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04  8:28 [PATCH 1/2] crypto: jitterentropy - drop redundant delta check in jent_entropy_init Thorsten Blum
2026-05-04  8:28 ` [PATCH 2/2] crypto: jitterentropy - fix URL Thorsten Blum
2026-05-04 11:47   ` Stephan Müller
2026-05-04 11:47 ` [PATCH 1/2] crypto: jitterentropy - drop redundant delta check in jent_entropy_init Stephan Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox