[PATCH v2] keys: Fix typos in 'struct key_type' function pointer comments

Thorsten Blum posted 1 patch 3 months, 2 weeks ago
include/linux/key-type.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
[PATCH v2] keys: Fix typos in 'struct key_type' function pointer comments
Posted by Thorsten Blum 3 months, 2 weeks ago
s/it/if/ and s/revokation/revocation/ and adjust the formatting to be
consistent with the other comments.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Adjust the trailing '*/' as suggested by Jarkko
- Link to v1: https://lore.kernel.org/lkml/20251016123619.98728-2-thorsten.blum@linux.dev/
---
 include/linux/key-type.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/linux/key-type.h b/include/linux/key-type.h
index 5caf3ce82373..5dfda728ff69 100644
--- a/include/linux/key-type.h
+++ b/include/linux/key-type.h
@@ -107,11 +107,12 @@ struct key_type {
 	 */
 	int (*match_preparse)(struct key_match_data *match_data);
 
-	/* Free preparsed match data (optional).  This should be supplied it
-	 * ->match_preparse() is supplied. */
+	/* Free preparsed match data (optional).  This should be supplied if
+	 * ->match_preparse() is supplied.
+	 */
 	void (*match_free)(struct key_match_data *match_data);
 
-	/* clear some of the data from a key on revokation (optional)
+	/* clear some of the data from a key on revocation (optional)
 	 * - the key's semaphore will be write-locked by the caller
 	 */
 	void (*revoke)(struct key *key);
-- 
2.51.0
Re: [PATCH v2] keys: Fix typos in 'struct key_type' function pointer comments
Posted by Jarkko Sakkinen 3 months, 1 week ago
On Sat, Oct 25, 2025 at 11:55:19AM +0200, Thorsten Blum wrote:
> s/it/if/ and s/revokation/revocation/ and adjust the formatting to be
> consistent with the other comments.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> Changes in v2:
> - Adjust the trailing '*/' as suggested by Jarkko
> - Link to v1: https://lore.kernel.org/lkml/20251016123619.98728-2-thorsten.blum@linux.dev/
> ---
>  include/linux/key-type.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/key-type.h b/include/linux/key-type.h
> index 5caf3ce82373..5dfda728ff69 100644
> --- a/include/linux/key-type.h
> +++ b/include/linux/key-type.h
> @@ -107,11 +107,12 @@ struct key_type {
>  	 */
>  	int (*match_preparse)(struct key_match_data *match_data);
>  
> -	/* Free preparsed match data (optional).  This should be supplied it
> -	 * ->match_preparse() is supplied. */
> +	/* Free preparsed match data (optional).  This should be supplied if
> +	 * ->match_preparse() is supplied.
> +	 */
>  	void (*match_free)(struct key_match_data *match_data);
>  
> -	/* clear some of the data from a key on revokation (optional)
> +	/* clear some of the data from a key on revocation (optional)

A sentence starts with capital.

>  	 * - the key's semaphore will be write-locked by the caller

And end with preiod. It makes no to fix surgical issue in a source
code commit if you still leave it half broken.

>  	 */
>  	void (*revoke)(struct key *key);

Please address the comment format ie. have it.

/*
 * text

> -- 
> 2.51.0
> 

BR, Jarkko