summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Wauters <rubenru09@aol.com>2025-07-13 14:13:50 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2025-07-18 20:52:01 +1000
commit4fec76bcc5357fb10f2f69c1bf1e163db93616f1 (patch)
tree0a20e06914207f5f5f2bb692c6a2d1d600831e2c
parent5eb32430df783e212ffed8d35cc494a8941cda0a (diff)
crypto: jitter - replace ARRAY_SIZE definition with header include
The ARRAY_SIZE macro is already defined in linux/array_size.h This patch replaces the ARRAY_SIZE definition in jitterentropy.c with an include, to make the code cleaner, and help reduce the number of duplicate ARRAY_SIZE definitions in the codebase. Signed-off-by: Ruben Wauters <rubenru09@aol.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/jitterentropy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/jitterentropy.c b/crypto/jitterentropy.c
index 3b390bd6c119..3f93cdc9a7af 100644
--- a/crypto/jitterentropy.c
+++ b/crypto/jitterentropy.c
@@ -145,6 +145,7 @@ struct rand_data {
*/
#define JENT_ENTROPY_SAFETY_FACTOR 64
+#include <linux/array_size.h>
#include <linux/fips.h>
#include <linux/minmax.h>
#include "jitterentropy.h"
@@ -178,7 +179,6 @@ static const unsigned int jent_apt_cutoff_lookup[15] = {
static const unsigned int jent_apt_cutoff_permanent_lookup[15] = {
355, 447, 479, 494, 502, 507, 510, 512,
512, 512, 512, 512, 512, 512, 512 };
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
static void jent_apt_init(struct rand_data *ec, unsigned int osr)
{