Skip to contentSkip to conversation

jitterentropy: fix comments

PATCH In review Alexander E. Patrakov 2 participants 2 messages Sep 18, 2019 – Oct 4, 2019 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jitterentropy: fix comments

One should not say "ec can be NULL" and then dereference it. One cannot talk about the return value if the function returns void.

---
 crypto/jitterentropy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
crypto/jitterentropy.c +3 -3
index 77fa2120fe0c..9597f9f5723d 100644
@@ -172,7 +172,7 @@ static __u64 jent_loop_shuffle(struct rand_data *ec,
  * implies that careful retesting must be done.
  *
  * Input:
- * @ec entropy collector struct -- may be NULL
+ * @ec entropy collector struct
  * @time time stamp to be injected
  * @loop_cnt if a value not equal to 0 is set, use the given value as number of
  *	     loops to perform the folding
@@ -400,8 +400,8 @@ static void jent_gen_entropy(struct rand_data *ec)
  * primes the test if needed.
  *
  * Return:
- * 0 if FIPS test passed
- * < 0 if FIPS test failed
+ * returns normally if FIPS test passed
+ * panics the kernel if FIPS test failed
  */
 static void jent_fips_test(struct rand_data *ec)
 {
Signature · 1 line
2.23.0
maintainer
#1 lore raw
Quoted 7 lines · Alexander E. Patrakov

One should not say "ec can be NULL" and then dereference it. One cannot talk about the return value if the function returns void.

---
crypto/jitterentropy.c | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt