* [PATCH] jitterentropy: fix comments
@ 2019-09-18 7:28 Alexander E. Patrakov
2019-10-04 15:42 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Alexander E. Patrakov @ 2019-09-18 7:28 UTC (permalink / raw)
To: linux-crypto; +Cc: smueller, 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.
Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
---
crypto/jitterentropy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/crypto/jitterentropy.c b/crypto/jitterentropy.c
index 77fa2120fe0c..9597f9f5723d 100644
--- a/crypto/jitterentropy.c
+++ b/crypto/jitterentropy.c
@@ -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)
{
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] jitterentropy: fix comments
2019-09-18 7:28 [PATCH] jitterentropy: fix comments Alexander E. Patrakov
@ 2019-10-04 15:42 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2019-10-04 15:42 UTC (permalink / raw)
To: Alexander E. Patrakov; +Cc: linux-crypto, smueller, patrakov
Alexander E. Patrakov <patrakov@gmail.com> wrote:
> One should not say "ec can be NULL" and then dereference it.
> One cannot talk about the return value if the function returns void.
>
> Signed-off-by: Alexander E. Patrakov <patrakov@gmail.com>
> ---
> crypto/jitterentropy.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-04 15:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 7:28 [PATCH] jitterentropy: fix comments Alexander E. Patrakov
2019-10-04 15:42 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).