summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-oe/recipes-benchmark/fio/fio/0003-lib-rand-get-rid-of-unused-MAX_SEED_BUCKETS.patch
blob: fc4af0a519762423b83c9e6527d8b6fed88e220c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From f4dd3f2ad435a75862ad3f34a661b169f72c7885 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@kernel.dk>
Date: Wed, 10 Aug 2022 09:51:49 -0600
Subject: [PATCH] lib/rand: get rid of unused MAX_SEED_BUCKETS

It's only used to size the array, we don't need it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 lib/rand.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lib/rand.c b/lib/rand.c
index 1ce4a849..0e787a62 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -112,12 +112,8 @@ void __fill_random_buf_small(void *buf, unsigned int len, uint64_t seed)
 
 void __fill_random_buf(void *buf, unsigned int len, uint64_t seed)
 {
-#define MAX_SEED_BUCKETS 16
-	static uint64_t prime[MAX_SEED_BUCKETS] = {1,  2,  3,  5,
-						   7,  11, 13, 17,
-						   19, 23, 29, 31,
-						   37, 41, 43, 47};
-
+	static uint64_t prime[] = {1, 2, 3, 5, 7, 11, 13, 17,
+				   19, 23, 29, 31, 37, 41, 43, 47};
 	uint64_t *b, *e, s[CONFIG_SEED_BUCKETS];
 	unsigned int rest;
 	int p;