Skip to content

Commit

Permalink
lib/rand: get rid of unused MAX_SEED_BUCKETS
Browse files Browse the repository at this point in the history
It's only used to size the array, we don't need it.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Aug 10, 2022
1 parent 6b2353c commit 9dc528b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9dc528b

Please sign in to comment.