]> git.baikalelectronics.ru Git - kernel.git/commit
random: account for arch randomness in bits
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 7 Jun 2022 15:04:38 +0000 (17:04 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 10 Jun 2022 09:29:42 +0000 (11:29 +0200)
commit77fc95f8c0dc9e1f8e620ec14d2fb65028fb7adc
tree292233e8645cced0dd5de9ed1501298d1a8ec3d0
parent39e0f991a62ed5efabd20711a7b6e7da92603170
random: account for arch randomness in bits

Rather than accounting in bytes and multiplying (shifting), we can just
account in bits and avoid the shift. The main motivation for this is
there are other patches in flux that expand this code a bit, and
avoiding the duplication of "* 8" everywhere makes things a bit clearer.

Cc: stable@vger.kernel.org
Fixes: 12e45a2a6308 ("random: credit architectural init the exact amount")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c