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