For ${atomic}_sub_and_test() the @i parameter is the value to subtract, not add. Fix the typo in the kerneldoc template and generate the headers with this update. Fixes: ad8110706f38 ("locking/atomic: scripts: generate kerneldoc comments") Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Carlos Llamas <cmllamas@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20240515133844.3502360-1-cmllamas@google.com
14 lines
342 B
Plaintext
14 lines
342 B
Plaintext
cat <<EOF
|
|
/**
|
|
* ${class}${atomicname}() - atomic subtract and test if zero with ${desc_order} ordering
|
|
* @i: ${int} value to subtract
|
|
* @v: pointer to ${atomic}_t
|
|
*
|
|
* Atomically updates @v to (@v - @i) with ${desc_order} ordering.
|
|
*
|
|
* ${desc_noinstr}
|
|
*
|
|
* Return: @true if the resulting value of @v is zero, @false otherwise.
|
|
*/
|
|
EOF
|