]> www.infradead.org Git - users/jedix/linux-maple.git/commit
random: Avoid open-coded use of ratelimit_state structure's ->missed field
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 13 Mar 2025 23:11:38 +0000 (16:11 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 8 May 2025 23:13:26 +0000 (16:13 -0700)
commit48e864ae865744d1451b1776a14acfa422e8a115
tree1b864209ef5b794ecb8663356abb32e11cf4bbe6
parent56a7b9f8b05981e929becb45a826558779bca6f6
random: Avoid open-coded use of ratelimit_state structure's ->missed field

The _credit_init_bits() function directly accesses the ratelimit_state
structure's ->missed field, which works, but which also makes it
more difficult to change this field.  Therefore, make use of the
ratelimit_state_get_miss() and ratelimit_state_inc_miss() functions
instead of directly accessing the ->missed field.

Link: https://lore.kernel.org/all/fbe93a52-365e-47fe-93a4-44a44547d601@paulmck-laptop/
Link: https://lore.kernel.org/all/20250423115409.3425-1-spasswolf@web.de/
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
"Jason A. Donenfeld" <Jason@zx2c4.com>
drivers/char/random.c