Skip to content
Commit e3d2c5e7 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld
Browse files

random: use symbolic constants for crng_init states



crng_init represents a state machine, with three states, and various
rules for transitions. For the longest time, we've been managing these
with "0", "1", and "2", and expecting people to figure it out. To make
the code more obvious, replace these with proper enum values
representing the transition, and then redocument what each of these
states mean.

Reviewed-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
parent d4150779
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment