Files
linux/drivers
Jason A. Donenfeld e9067d3822 random: simplify arithmetic function flow in account()
commit a254a0e409 upstream.

Now that have_bytes is never modified, we can simplify this function.
First, we move the check for negative entropy_count to be first. That
ensures that subsequent reads of this will be non-negative. Then,
have_bytes and ibytes can be folded into their one use site in the
min_t() function.

Suggested-by: Dominik Brodowski <linux@dominikbrodowski.net>
Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-29 09:26:31 +09:00
..
2023-05-16 12:22:16 +09:00
2023-06-29 09:26:11 +09:00
2023-06-29 09:26:28 +09:00
2023-05-16 09:58:13 +09:00
2023-06-29 09:26:07 +09:00