[PATCH] futex: add missing function parameter comments

Randy Dunlap posted 1 patch 1 month, 2 weeks ago
There is a newer version of this series
include/asm-generic/futex.h |    4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH] futex: add missing function parameter comments
Posted by Randy Dunlap 1 month, 2 weeks ago
Correct or add the missing function parameter kernel-doc comments
to avoid warnings:

Warning: include/asm-generic/futex.h:38 function parameter 'op' not
 described in 'futex_atomic_op_inuser_local'
Warning: include/asm-generic/futex.h:38 function parameter 'oparg' not
 described in 'futex_atomic_op_inuser_local'
Warning: include/asm-generic/futex.h:38 function parameter 'oval' not
 described in 'futex_atomic_op_inuser_local'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: André Almeida <andrealmeid@igalia.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org

 include/asm-generic/futex.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-next-20260211.orig/include/asm-generic/futex.h
+++ linux-next-20260211/include/asm-generic/futex.h
@@ -25,7 +25,9 @@
  *			  argument and comparison of the previous
  *			  futex value with another constant.
  *
- * @encoded_op:	encoded operation to execute
+ * @op:		encoded operation to execute
+ * @oparg:	operation code (one of FUTEX_OP_...)
+ * @oval:	previous value at @uaddr on successful return
  * @uaddr:	pointer to user space address
  *
  * Return:
Re: [PATCH] futex: add missing function parameter comments
Posted by André Almeida 1 month, 2 weeks ago
Hi Randy,

Thanks for your patch

Em 28/02/2026 04:17, Randy Dunlap escreveu:
> Correct or add the missing function parameter kernel-doc comments
> to avoid warnings:
> 
> Warning: include/asm-generic/futex.h:38 function parameter 'op' not
>   described in 'futex_atomic_op_inuser_local'
> Warning: include/asm-generic/futex.h:38 function parameter 'oparg' not
>   described in 'futex_atomic_op_inuser_local'
> Warning: include/asm-generic/futex.h:38 function parameter 'oval' not
>   described in 'futex_atomic_op_inuser_local'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> Cc: Thomas Gleixner <tglx@kernel.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Darren Hart <dvhart@infradead.org>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> Cc: André Almeida <andrealmeid@igalia.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: linux-arch@vger.kernel.org
> 
>   include/asm-generic/futex.h |    4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> --- linux-next-20260211.orig/include/asm-generic/futex.h
> +++ linux-next-20260211/include/asm-generic/futex.h
> @@ -25,7 +25,9 @@
>    *			  argument and comparison of the previous
>    *			  futex value with another constant.
>    *
> - * @encoded_op:	encoded operation to execute
> + * @op:		encoded operation to execute

I think we don't need the "encoded" part anymore

> + * @oparg:	operation code (one of FUTEX_OP_...)

This is the argument of the operation, e.g when op is FUTEX_OP_ADD, 
oparg is the value to be added.

> + * @oval:	previous value at @uaddr on successful return
>    * @uaddr:	pointer to user space address
>    *
>    * Return:

Re: [PATCH] futex: add missing function parameter comments
Posted by Randy Dunlap 1 month, 2 weeks ago

On 3/3/26 6:23 AM, André Almeida wrote:

>>   include/asm-generic/futex.h |    4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> --- linux-next-20260211.orig/include/asm-generic/futex.h
>> +++ linux-next-20260211/include/asm-generic/futex.h
>> @@ -25,7 +25,9 @@
>>    *              argument and comparison of the previous
>>    *              futex value with another constant.
>>    *
>> - * @encoded_op:    encoded operation to execute
>> + * @op:        encoded operation to execute
> 
> I think we don't need the "encoded" part anymore
> 
>> + * @oparg:    operation code (one of FUTEX_OP_...)
> 
> This is the argument of the operation, e.g when op is FUTEX_OP_ADD, oparg is the value to be added.
> 
>> + * @oval:    previous value at @uaddr on successful return
>>    * @uaddr:    pointer to user space address
>>    *
>>    * Return:
> 

Thanks. I'll send a v2.

-- 
~Randy