linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Improve comment of get_random_bytes function
@ 2022-10-01  0:18 William Zijl
  2022-10-01 11:31 ` Jason A. Donenfeld
  2022-10-01 13:13 ` Bagas Sanjaya
  0 siblings, 2 replies; 3+ messages in thread
From: William Zijl @ 2022-10-01  0:18 UTC (permalink / raw)
  To: Jason; +Cc: tytso, linux-kernel, William Zijl

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`. This patch replaces those sentenced with
`the randomness of this function`, `at any point prior to this`
respectively.

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 64ee16ffb8b7..e0b1b31789a5 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 of 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] 3+ messages in thread

* Re: [PATCH] Improve comment of get_random_bytes function
  2022-10-01  0:18 [PATCH] Improve comment of get_random_bytes function William Zijl
@ 2022-10-01 11:31 ` Jason A. Donenfeld
  2022-10-01 13:13 ` Bagas Sanjaya
  1 sibling, 0 replies; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-10-01 11:31 UTC (permalink / raw)
  To: William Zijl; +Cc: tytso, linux-kernel

On Sat, Oct 01, 2022 at 02:18:31AM +0200, William Zijl wrote:
> 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`. This patch replaces those sentenced with
> `the randomness of this function`, `at any point prior to this`
> respectively.

"at any point prior" seems fine to me.

"the randomness by this function" is wrong, but the correction for it
should be "the randomness returned by this function".

Feel free to submit a v2.

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Improve comment of get_random_bytes function
  2022-10-01  0:18 [PATCH] Improve comment of get_random_bytes function William Zijl
  2022-10-01 11:31 ` Jason A. Donenfeld
@ 2022-10-01 13:13 ` Bagas Sanjaya
  1 sibling, 0 replies; 3+ messages in thread
From: Bagas Sanjaya @ 2022-10-01 13:13 UTC (permalink / raw)
  To: William Zijl; +Cc: Jason, tytso, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

On Sat, Oct 01, 2022 at 02:18:31AM +0200, William Zijl wrote:
> 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`. This patch replaces those sentenced with
> `the randomness of this function`, `at any point prior to this`
> respectively.

s/This patch replaces/Replace/

Why? See Documentation/process/submitting-patches.rst.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-01 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01  0:18 [PATCH] Improve comment of get_random_bytes function William Zijl
2022-10-01 11:31 ` Jason A. Donenfeld
2022-10-01 13:13 ` Bagas Sanjaya

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).