[PATCH v6 5/7] cmd: rng: Use a statically allocated array for random bytes

Simon Glass sjg at chromium.org
Tue Jul 5 11:47:16 CEST 2022


On Mon, 4 Jul 2022 at 07:35, Sughosh Ganu <sughosh.ganu at linaro.org> wrote:
>
> Use a statically allocated buffer on stack instead of using malloc for
> reading the random bytes. Using a local array is faster than
> allocating heap memory on every initiation of the command.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> ---
> Changes since V5: None
>
>  cmd/rng.c | 17 +++++++----------
>  1 file changed, 7 insertions(+), 10 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list