summaryrefslogtreecommitdiff
path: root/chip/host
diff options
context:
space:
mode:
authorPin-yen Lin <treapking@chromium.org>2022-06-28 03:47:38 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-28 04:56:37 +0000
commitdca9d74321af5edcf8a8830eedb2023fa92c3040 (patch)
tree9ac4062b935c61342b47d1ad4abb5365d95b3f98 /chip/host
parent188ed72baac3aab55f153c57835f4bfeadab9518 (diff)
downloadchrome-ec-dca9d74321af5edcf8a8830eedb2023fa92c3040.tar.gz
Revert "trng: Rename rand to trng_rand"
This reverts commit a6b0b3554f59cc9b0c4aae9bff7dff075f2089a9. Reason for revert: This CL breaks ec-utils-test package and affects CQ Original change's description: > trng: Rename rand to trng_rand > > The declaration for rand conflicts with the standard library declaration > so rename it from "rand" to "trng_rand". This has the benefit of making > it obvious when we're using the true random number generator. > > For consistency, this also renames init_trng/exit_trng to > trng_init/trng_exit. > > BRANCH=none > BUG=b:234181908 > TEST=./util/compare_build.sh -b all -j 120 > => MATCH > > Signed-off-by: Tom Hughes <tomhughes@chromium.org> > Change-Id: Ic3305a91263c45786c051eaa5b3689e7464aa0ab > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3712032 > Reviewed-by: Bobby Casey <bobbycasey@google.com> > Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Bug: b:234181908,b:237344361 Change-Id: Iceae55ad9ff0e6aa98aebd474f92a98e12c287e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3726597 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Pin-yen Lin <treapking@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Pin-yen Lin <treapking@chromium.org> Commit-Queue: Pin-yen Lin <treapking@chromium.org> Tested-by: Pin-yen Lin <treapking@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'chip/host')
-rw-r--r--chip/host/trng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/host/trng.c b/chip/host/trng.c
index cb69268e34..8407aa6ea1 100644
--- a/chip/host/trng.c
+++ b/chip/host/trng.c
@@ -21,17 +21,17 @@
static unsigned int seed;
-test_mockable void trng_init(void)
+test_mockable void init_trng(void)
{
seed = 0;
srand(seed);
}
-test_mockable void trng_exit(void)
+test_mockable void exit_trng(void)
{
}
-test_mockable void trng_rand_bytes(void *buffer, size_t len)
+test_mockable void rand_bytes(void *buffer, size_t len)
{
uint8_t *b, *end;