random: cleanup fractional entropy shift constants
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 13 Jan 2022 17:18:48 +0000 (18:18 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 17 Jan 2022 17:37:32 +0000 (18:37 +0100)
commit62d337f0742e9f29588d8f81344e41fc3b00e5b1
treec9bf51861b1292ad4688a3b853d68ddb5c52928c
parent317162eb530869c4f95ca4a3626c233bf05ab221
random: cleanup fractional entropy shift constants

The entropy estimator is calculated in terms of 1/8 bits, which means
there are various constants where things are shifted by 3. Move these
into our pool info enum with the other relevant constants. While we're
at it, move an English assertion about sizes into a proper BUILD_BUG_ON
so that the compiler can ensure this invariant.

Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c