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

Thorsten Blum posted 1 patch 3 months, 3 weeks ago
There is a newer version of this series
include/linux/key-type.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] keys: Fix typos in 'struct key_type' function pointer comments
Posted by Thorsten Blum 3 months, 3 weeks ago
s/it/if/ and s/revokation/revocation/

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 include/linux/key-type.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/key-type.h b/include/linux/key-type.h
index 5caf3ce82373..5eb2e64803db 100644
--- a/include/linux/key-type.h
+++ b/include/linux/key-type.h
@@ -107,11 +107,11 @@ struct key_type {
 	 */
 	int (*match_preparse)(struct key_match_data *match_data);
 
-	/* Free preparsed match data (optional).  This should be supplied it
+	/* 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] keys: Fix typos in 'struct key_type' function pointer comments
Posted by Jarkko Sakkinen 3 months, 2 weeks ago
 On Thu, Oct 16, 2025 at 02:36:19PM +0200, Thorsten Blum wrote:
> s/it/if/ and s/revokation/revocation/
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  include/linux/key-type.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/key-type.h b/include/linux/key-type.h
> index 5caf3ce82373..5eb2e64803db 100644
> --- a/include/linux/key-type.h
> +++ b/include/linux/key-type.h
> @@ -107,11 +107,11 @@ struct key_type {
>  	 */
>  	int (*match_preparse)(struct key_match_data *match_data);
>  
> -	/* Free preparsed match data (optional).  This should be supplied it
> +	/* Free preparsed match data (optional).  This should be supplied if
>  	 * ->match_preparse() is supplied. */

The comment is also formatted incorrectly. It should be:

	/* 
	 * 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
>  	 */

Ditto.

>  	void (*revoke)(struct key *key);
> -- 
> 2.51.0
> 

BR, Jarkko
Re: [PATCH] keys: Fix typos in 'struct key_type' function pointer comments
Posted by Thorsten Blum 3 months, 2 weeks ago
On 24. Oct 2025, at 21:04, Jarkko Sakkinen wrote:
> On Thu, Oct 16, 2025 at 02:36:19PM +0200, Thorsten Blum wrote:
>> s/it/if/ and s/revokation/revocation/
>> ...
> 
> The comment is also formatted incorrectly. It should be:
> 
> 	/* 
> 	 * Free preparsed match data (optional).  This should be supplied if
> 	 * ->match_preparse() is supplied. 
> 	 */

The other struct fields are all commented with the first sentence
starting after the '/*'.

I can fix this one trailing '*/' in v2, but the others should probably
be fixed in a separate patch?

Thanks,
Thorsten
Re: [PATCH] keys: Fix typos in 'struct key_type' function pointer comments
Posted by Jarkko Sakkinen 3 months, 1 week ago
On Fri, Oct 24, 2025 at 10:29:57PM +0200, Thorsten Blum wrote:
> On 24. Oct 2025, at 21:04, Jarkko Sakkinen wrote:
> > On Thu, Oct 16, 2025 at 02:36:19PM +0200, Thorsten Blum wrote:
> >> s/it/if/ and s/revokation/revocation/
> >> ...
> > 
> > The comment is also formatted incorrectly. It should be:
> > 
> > 	/* 
> > 	 * Free preparsed match data (optional).  This should be supplied if
> > 	 * ->match_preparse() is supplied. 
> > 	 */
> 
> The other struct fields are all commented with the first sentence
> starting after the '/*'.
> 
> I can fix this one trailing '*/' in v2, but the others should probably
> be fixed in a separate patch?

We don't want to batch update to all comments in this file as that e.g.
has more drawbacks than benefits because it increases the probability
of merge conflicts during backports.

I.e.

1. Refine the patch to address the remark that were anyhow modified.
2. Don't update any other comments just for the remark I did.
> 
> Thanks,
> Thorsten
> 


BR, Jarkko