Skip to content

Commit

Permalink
comments: fix API arg descriptions
Browse files Browse the repository at this point in the history
SHA256_arm: W and S should have been removed in:
    2021-02-19 sha256: don't pass W and S to SHA256_Transform_arm
    05ebafd

SHA256_sse2: W and S should have been included in:
    2021-02-06 sha256_sse2: add
    192d05b

tests/fork_func: wrong API comment in:
    2024-01-13 tests: add fork_func
    19efda2

util/entropy.h: ${er} should not have been included in:
    2020-09-22 entropy: expose _init(), _fill(), _done()
    ceaae67
  • Loading branch information
gperciva committed Jun 10, 2024
1 parent 5be14ac commit 8c3742e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
5 changes: 2 additions & 3 deletions alg/sha256_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ static const uint32_t Krnd[64] = {
X0 = vsha256su1q_u32(vsha256su0q_u32(X0, X1), X2, X3)

/**
* SHA256_Transform_arm(state, block, W, S):
* SHA256_Transform_arm(state, block):
* Compute the SHA256 block compression function, transforming ${state} using
* the data in ${block}. This implementation uses ARM SHA256 instructions,
* and should only be used if _SHA256 is defined and cpusupport_arm_sha256()
* returns nonzero. The arrays W and S may be filled with sensitive data, and
* should be cleared by the callee.
* returns nonzero.
*/
#ifdef POSIXFAIL_ABSTRACT_DECLARATOR
void
Expand Down
5 changes: 2 additions & 3 deletions alg/sha256_arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
#include <stdint.h>

/**
* SHA256_Transform_arm(state, block, W, S):
* SHA256_Transform_arm(state, block):
* Compute the SHA256 block compression function, transforming ${state} using
* the data in ${block}. This implementation uses ARM SHA256 instructions,
* and should only be used if _SHA256 is defined and cpusupport_arm_sha256()
* returns nonzero. The arrays W and S may be filled with sensitive data, and
* should be cleared by the callee.
* returns nonzero.
*/
#ifdef POSIXFAIL_ABSTRACT_DECLARATOR
void SHA256_Transform_arm(uint32_t state[8], const uint8_t block[64]);
Expand Down
2 changes: 1 addition & 1 deletion alg/sha256_sse2.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ MSG4(__m128i X0, __m128i X1, __m128i X2, __m128i X3)
}

/**
* SHA256_Transform_sse2(state, block):
* SHA256_Transform_sse2(state, block, W, S):
* Compute the SHA256 block compression function, transforming ${state} using
* the data in ${block}. This implementation uses x86 SSE2 instructions, and
* should only be used if _SSE2 is defined and cpusupport_x86_sse2() returns
Expand Down
2 changes: 1 addition & 1 deletion alg/sha256_sse2.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdint.h>

/**
* SHA256_Transform_sse2(state, block):
* SHA256_Transform_sse2(state, block, W, S):
* Compute the SHA256 block compression function, transforming ${state} using
* the data in ${block}. This implementation uses x86 SSE2 instructions, and
* should only be used if _SSE2 is defined and cpusupport_x86_sse2() returns
Expand Down
4 changes: 2 additions & 2 deletions tests/fork_func/check.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ int check_exec(void);
int check_order(void);

/**
* check_perftest(void):
* check_perftest(child_ms, num_reps):
* Check the amount of delay added by func_fork() and func_fork_wait().
*/
int check_perftest(int child_ms, int num_reps);
int check_perftest(int, int);

#endif /* !CHECK_H_ */
2 changes: 1 addition & 1 deletion tests/fork_func/check_perftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ benchmark_fork_func_millisleep(int ms)
}

/**
* check_perftest(void):
* check_perftest(child_ms, num_reps):
* Check the amount of delay added by func_fork() and func_fork_wait().
*/
int
Expand Down
2 changes: 1 addition & 1 deletion util/entropy.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int entropy_read_fill(struct entropy_read_cookie *, uint8_t *, size_t);
* entropy_read_done(er):
* Release any resources used by ${er}.
*/
int entropy_read_done(struct entropy_read_cookie * er);
int entropy_read_done(struct entropy_read_cookie *);

/**
* entropy_read(buf, buflen):
Expand Down

0 comments on commit 8c3742e

Please sign in to comment.