Skip to contentSkip to conversation

bitops: use correct parameter names in kernel-doc

PATCH In review Randy Dunlap 2 participants 3 messages Apr 30 – May 1

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bitops: use correct parameter names in kernel-doc

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'

---
v2: rebase & resend

Cc Yury Norov <[email protected]>
Cc Rasmus Villemoes <[email protected]>
Cc Arnd Bergmann <[email protected]>

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(-)
include/asm-generic/bitops/lock.h +3 -3
@@ -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
#1 lore raw
Quoted 11 lines · Randy Dunlap

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'

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

#2 lore raw
Quoted 15 lines · Yury Norov
Quoted 11 lines · Randy Dunlap

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'

Hi Randy,

Quoted 7 lines

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/[email protected]/

Signature · 1 line
~Randy