* [PATCH v2] Improve comment of get_random_bytes function
@ 2022-10-01 15:36 William Zijl
2022-10-01 21:39 ` Jason A. Donenfeld
0 siblings, 1 reply; 2+ messages in thread
From: William Zijl @ 2022-10-01 15:36 UTC (permalink / raw)
To: Jason; +Cc: tytso, linux-kernel, William Zijl
Hi all,
The old comment of this function had a double whitespace and contained
grammatical errors, such as: `the randomness by this function`, `at
least once at any point prior`. Replace those sentences with `the
randomness returned by this function`, `at any point prior to this`
respectively.
Thanks,
Gusted
Signed-off-by: William Zijl <postmaster@gusted.xyz>
---
drivers/char/random.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index fdf15f5c87dd..dd976008136b 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -382,11 +382,11 @@ static void _get_random_bytes(void *buf, size_t len)
}
/*
- * This function is the exported kernel interface. It returns some
- * number of good random numbers, suitable for key generation, seeding
- * TCP sequence numbers, etc. In order to ensure that the randomness
- * by this function is okay, the function wait_for_random_bytes()
- * should be called and return 0 at least once at any point prior.
+ * This function is the exported kernel interface. It returns some number
+ * of good random numbers, suitable for key generation, seeding TCP
+ * sequence numbers, etc. In order to ensure that the randomness returned
+ * by this function is okay, the function wait_for_random_bytes() should be
+ * called and return 0 at least once at any point prior to this.
*/
void get_random_bytes(void *buf, size_t len)
{
--
2.37.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Improve comment of get_random_bytes function
2022-10-01 15:36 [PATCH v2] Improve comment of get_random_bytes function William Zijl
@ 2022-10-01 21:39 ` Jason A. Donenfeld
0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2022-10-01 21:39 UTC (permalink / raw)
To: William Zijl; +Cc: tytso, linux-kernel
On Sat, Oct 1, 2022 at 5:36 PM William Zijl <postmaster@gusted.xyz> wrote:
>
> Hi all,
>
> The old comment of this function had a double whitespace and contained
> grammatical errors, such as: `the randomness by this function`, `at
> least once at any point prior`. Replace those sentences with `the
> randomness returned by this function`, `at any point prior to this`
> respectively.
Thanks. As mentioned, "at any point prior" seems fine to me, so I kept
that as-is, but committed the rest, and rewrote the commit message.
https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git/commit/?id=d687772e6d2cbffd91fdda64812f79192c1e7ca0
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-01 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01 15:36 [PATCH v2] Improve comment of get_random_bytes function William Zijl
2022-10-01 21:39 ` Jason A. Donenfeld
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).