diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 15:20:09 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-28 03:39:23 +0000 |
commit | 9592fae7fb78201480845546798bc1c7faedf389 (patch) | |
tree | 2faec397bfd52e9a53fd971da81566fd230a4bd2 /test/entropy.c | |
parent | 117b7d1980e2b70d9a2e83e99595a998f2dae1a8 (diff) | |
download | chrome-ec-9592fae7fb78201480845546798bc1c7faedf389.tar.gz |
test/entropy.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: If0496251d6ad350168b5126092a82ae267a908ba
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730498
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'test/entropy.c')
-rw-r--r-- | test/entropy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/entropy.c b/test/entropy.c index fb066a6c5b..5fdca3969f 100644 --- a/test/entropy.c +++ b/test/entropy.c @@ -26,7 +26,7 @@ uint32_t log2(int32_t val) int val1 = 31 - __builtin_clz(val); int val2 = 32 - __builtin_clz(val - 1); - return log2_mult * (val1 + val2)/2; + return log2_mult * (val1 + val2) / 2; } void run_test(int argc, char **argv) @@ -52,7 +52,7 @@ void run_test(int argc, char **argv) t1 = get_time(); if (i == 0) ccprintf("Got %zd bytes in %" PRId64 " us\n", - sizeof(buffer), t1.val - t0.val); + sizeof(buffer), t1.val - t0.val); for (j = 0; j < sizeof(buffer); j++) buckets[buffer[j]]++; @@ -82,7 +82,7 @@ void run_test(int argc, char **argv) ccprintf("\n"); ccprintf("Entropy: %u/1000 bits\n", - entropy * 1000 / (log2_mult * totalcount)); + entropy * 1000 / (log2_mult * totalcount)); /* We want at least 2 bits of entropy (out of a maximum of 8) */ if ((entropy / (log2_mult * totalcount)) >= 2) |