Skip to content

Commit 0f63702

Browse files
committed
random: remove unused OUTPUT_POOL constants
We no longer have an output pool. Rather, we have just a wakeup bits threshold for /dev/random reads, presumably so that processes don't hang. This value, random_write_wakeup_bits, is configurable anyway. So all the no longer usefully named OUTPUT_POOL constants were doing was setting a reasonable default for random_write_wakeup_bits. This commit gets rid of the constants and just puts it all in the default value of random_write_wakeup_bits. Reviewed-by: Dominik Brodowski <[email protected]> Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 90ed1e6 commit 0f63702

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/char/random.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,6 @@
363363
*/
364364
#define INPUT_POOL_SHIFT 12
365365
#define INPUT_POOL_WORDS (1 << (INPUT_POOL_SHIFT-5))
366-
#define OUTPUT_POOL_SHIFT 10
367-
#define OUTPUT_POOL_WORDS (1 << (OUTPUT_POOL_SHIFT-5))
368366
#define EXTRACT_SIZE (BLAKE2S_HASH_SIZE / 2)
369367

370368
/*
@@ -382,7 +380,7 @@
382380
* should wake up processes which are selecting or polling on write
383381
* access to /dev/random.
384382
*/
385-
static int random_write_wakeup_bits = 28 * OUTPUT_POOL_WORDS;
383+
static int random_write_wakeup_bits = 28 * (1 << 5);
386384

387385
/*
388386
* Originally, we used a primitive polynomial of degree .poolwords

0 commit comments

Comments
 (0)