]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: rng: Use a statically allocated array for random bytes
authorSughosh Ganu <sughosh.ganu@linaro.org>
Fri, 22 Jul 2022 16:02:07 +0000 (21:32 +0530)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 2 Aug 2022 20:50:02 +0000 (23:50 +0300)
commite7c2c6acdddb563b73205c1bf6daee9c60aeb250
tree0bee8c92ee2c645f415dc5cf5f8e5126ad341918
parentda4a3f0f63cc81ab108d0fe5bb2dc396f1e79913
cmd: rng: Use a statically allocated array for random bytes

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@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
cmd/rng.c