]> 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)
commit54a4a23d9824b75388b94405d1c6d507591ef537
tree292233e8645cced0dd5de9ed1501298d1a8ec3d0
parent122c9a19f0510b2a0d7b055a45fdbd0b1c3cea9b
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: 2aea1841598f ("random: credit architectural init the exact amount")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c