Re: [PATCH v2] random: use symbolic constants for crng_init states

From: Dominik Brodowski
Date: Mon May 09 2022 - 02:17:30 EST


Am Sun, May 08, 2022 at 07:36:10PM +0200 schrieb Jason A. Donenfeld:
> 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.
>
> Cc: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>
> Cc: Joe Perches <joe@xxxxxxxxxxx>
> Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>

Reviewed-by: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>

Thanks,
Dominik