WSL2-Linux-Kernel/scripts/atomic/kerneldoc
Mark Rutland b33eb50a92 locking/atomic: scripts: fix ${atomic}_dec_if_positive() kerneldoc
The ${atomic}_dec_if_positive() ops are unlike all the other conditional
atomic ops. Rather than returning a boolean success value, these return
the value that the atomic variable would be updated to, even when no
update is performed.

We missed this when adding kerneldoc comments, and the documentation for
${atomic}_dec_if_positive() erroneously states:

| Return: @true if @v was updated, @false otherwise.

Ideally we'd clean this up by aligning ${atomic}_dec_if_positive() with
the usual atomic op conventions: with ${atomic}_fetch_dec_if_positive()
for those who care about the value of the varaible, and
${atomic}_dec_if_positive() returning a boolean success value.

In the mean time, align the documentation with the current reality.

Fixes: ad8110706f ("locking/atomic: scripts: generate kerneldoc comments")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/r/20230615132734.1119765-1-mark.rutland@arm.com
2023-06-16 16:46:30 +02:00
..
add locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
add_negative locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
add_unless locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
and locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
andnot locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
cmpxchg locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
dec locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
dec_and_test locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
dec_if_positive locking/atomic: scripts: fix ${atomic}_dec_if_positive() kerneldoc 2023-06-16 16:46:30 +02:00
dec_unless_positive locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
inc locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
inc_and_test locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
inc_not_zero locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
inc_unless_negative locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
or locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
read locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
set locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
sub locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
sub_and_test locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
try_cmpxchg locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
xchg locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00
xor locking/atomic: scripts: generate kerneldoc comments 2023-06-05 09:57:23 +02:00