public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] bitops: use correct parameter names in kernel-doc
@ 2026-04-30 23:39 Randy Dunlap
  2026-05-01  0:11 ` Yury Norov
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2026-04-30 23:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Yury Norov, Rasmus Villemoes, Arnd Bergmann,
	linux-arch

Fix the kernel-doc comments to use the correct parameter names to
avoid kernel-doc warnings:

Warning: include/asm-generic/bitops/lock.h:19 function parameter 'p'
 not described in 'arch_test_and_set_bit_lock'
Warning: include/asm-generic/bitops/lock.h:41 function parameter 'p'
 not described in 'arch_clear_bit_unlock'
Warning: include/asm-generic/bitops/lock.h:59 function parameter 'p'
 not described in 'arch___clear_bit_unlock'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
v2: rebase & resend

Cc: Yury Norov <yury.norov@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arch@vger.kernel.org

Note: Shouldn't this line in the MAINTAINERS file:
F:	include/asm-generic/bitops
instead be
F:	include/asm-generic/bitops/

 include/asm-generic/bitops/lock.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-next-20260429.orig/include/asm-generic/bitops/lock.h
+++ linux-next-20260429/include/asm-generic/bitops/lock.h
@@ -9,7 +9,7 @@
 /**
  * arch_test_and_set_bit_lock - Set a bit and return its old value, for lock
  * @nr: Bit to set
- * @addr: Address to count from
+ * @p: Address to count from
  *
  * This operation is atomic and provides acquire barrier semantics if
  * the returned value is 0.
@@ -33,7 +33,7 @@ arch_test_and_set_bit_lock(unsigned int
 /**
  * arch_clear_bit_unlock - Clear a bit in memory, for unlock
  * @nr: the bit to set
- * @addr: the address to start counting from
+ * @p: the address to start counting from
  *
  * This operation is atomic and provides release barrier semantics.
  */
@@ -47,7 +47,7 @@ arch_clear_bit_unlock(unsigned int nr, v
 /**
  * arch___clear_bit_unlock - Clear a bit in memory, for unlock
  * @nr: the bit to set
- * @addr: the address to start counting from
+ * @p: the address to start counting from
  *
  * A weaker form of clear_bit_unlock() as used by __bit_lock_unlock(). If all
  * the bits in the word are protected by this lock some archs can use weaker

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

* Re: [PATCH v2] bitops: use correct parameter names in kernel-doc
  2026-04-30 23:39 [PATCH v2] bitops: use correct parameter names in kernel-doc Randy Dunlap
@ 2026-05-01  0:11 ` Yury Norov
  2026-05-01  5:02   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Yury Norov @ 2026-05-01  0:11 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Yury Norov, Rasmus Villemoes, Arnd Bergmann,
	linux-arch

On Thu, Apr 30, 2026 at 04:39:34PM -0700, Randy Dunlap wrote:
> Fix the kernel-doc comments to use the correct parameter names to
> avoid kernel-doc warnings:
> 
> Warning: include/asm-generic/bitops/lock.h:19 function parameter 'p'
>  not described in 'arch_test_and_set_bit_lock'
> Warning: include/asm-generic/bitops/lock.h:41 function parameter 'p'
>  not described in 'arch_clear_bit_unlock'
> Warning: include/asm-generic/bitops/lock.h:59 function parameter 'p'
>  not described in 'arch___clear_bit_unlock'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Hi Randy,

Thanks for the patch!

The arches implementing those functions use 'addr', not 'p'. In
generic version originally it was 'addr, but then the functions
were re-implemented in 84c6591103dbe, thus this 'p' appeared. 

Maybe just restore this 'addr' instead of fixing comments?

Thanks,
Yury

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

* Re: [PATCH v2] bitops: use correct parameter names in kernel-doc
  2026-05-01  0:11 ` Yury Norov
@ 2026-05-01  5:02   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-05-01  5:02 UTC (permalink / raw)
  To: Yury Norov
  Cc: linux-kernel, Yury Norov, Rasmus Villemoes, Arnd Bergmann,
	linux-arch



On 4/30/26 5:11 PM, Yury Norov wrote:
> On Thu, Apr 30, 2026 at 04:39:34PM -0700, Randy Dunlap wrote:
>> Fix the kernel-doc comments to use the correct parameter names to
>> avoid kernel-doc warnings:
>>
>> Warning: include/asm-generic/bitops/lock.h:19 function parameter 'p'
>>  not described in 'arch_test_and_set_bit_lock'
>> Warning: include/asm-generic/bitops/lock.h:41 function parameter 'p'
>>  not described in 'arch_clear_bit_unlock'
>> Warning: include/asm-generic/bitops/lock.h:59 function parameter 'p'
>>  not described in 'arch___clear_bit_unlock'
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> 
> Hi Randy,
> 
> Thanks for the patch!
> 
> The arches implementing those functions use 'addr', not 'p'. In
> generic version originally it was 'addr, but then the functions
> were re-implemented in 84c6591103dbe, thus this 'p' appeared. 
> 
> Maybe just restore this 'addr' instead of fixing comments?

OK, did that:
https://lore.kernel.org/all/20260501045923.2884548-1-rdunlap@infradead.org/

-- 
~Randy


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

end of thread, other threads:[~2026-05-01  5:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 23:39 [PATCH v2] bitops: use correct parameter names in kernel-doc Randy Dunlap
2026-05-01  0:11 ` Yury Norov
2026-05-01  5:02   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox