Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

locking/atomic: scripts: fix ${atomic}_sub_and_test() kerneldoc

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

authored by

Carlos Llamas and committed by
Peter Zijlstra
f92a59f6 c3f38fa6

+10 -10
+3 -3
include/linux/atomic/atomic-arch-fallback.h
··· 2242 2242 2243 2243 /** 2244 2244 * raw_atomic_sub_and_test() - atomic subtract and test if zero with full ordering 2245 - * @i: int value to add 2245 + * @i: int value to subtract 2246 2246 * @v: pointer to atomic_t 2247 2247 * 2248 2248 * Atomically updates @v to (@v - @i) with full ordering. ··· 4368 4368 4369 4369 /** 4370 4370 * raw_atomic64_sub_and_test() - atomic subtract and test if zero with full ordering 4371 - * @i: s64 value to add 4371 + * @i: s64 value to subtract 4372 4372 * @v: pointer to atomic64_t 4373 4373 * 4374 4374 * Atomically updates @v to (@v - @i) with full ordering. ··· 4690 4690 } 4691 4691 4692 4692 #endif /* _LINUX_ATOMIC_FALLBACK_H */ 4693 - // 14850c0b0db20c62fdc78ccd1d42b98b88d76331 4693 + // b565db590afeeff0d7c9485ccbca5bb6e155749f
+4 -4
include/linux/atomic/atomic-instrumented.h
··· 1349 1349 1350 1350 /** 1351 1351 * atomic_sub_and_test() - atomic subtract and test if zero with full ordering 1352 - * @i: int value to add 1352 + * @i: int value to subtract 1353 1353 * @v: pointer to atomic_t 1354 1354 * 1355 1355 * Atomically updates @v to (@v - @i) with full ordering. ··· 2927 2927 2928 2928 /** 2929 2929 * atomic64_sub_and_test() - atomic subtract and test if zero with full ordering 2930 - * @i: s64 value to add 2930 + * @i: s64 value to subtract 2931 2931 * @v: pointer to atomic64_t 2932 2932 * 2933 2933 * Atomically updates @v to (@v - @i) with full ordering. ··· 4505 4505 4506 4506 /** 4507 4507 * atomic_long_sub_and_test() - atomic subtract and test if zero with full ordering 4508 - * @i: long value to add 4508 + * @i: long value to subtract 4509 4509 * @v: pointer to atomic_long_t 4510 4510 * 4511 4511 * Atomically updates @v to (@v - @i) with full ordering. ··· 5050 5050 5051 5051 5052 5052 #endif /* _LINUX_ATOMIC_INSTRUMENTED_H */ 5053 - // ce5b65e0f1f8a276268b667194581d24bed219d4 5053 + // 8829b337928e9508259079d32581775ececd415b
+2 -2
include/linux/atomic/atomic-long.h
··· 1535 1535 1536 1536 /** 1537 1537 * raw_atomic_long_sub_and_test() - atomic subtract and test if zero with full ordering 1538 - * @i: long value to add 1538 + * @i: long value to subtract 1539 1539 * @v: pointer to atomic_long_t 1540 1540 * 1541 1541 * Atomically updates @v to (@v - @i) with full ordering. ··· 1809 1809 } 1810 1810 1811 1811 #endif /* _LINUX_ATOMIC_LONG_H */ 1812 - // 1c4a26fc77f345342953770ebe3c4d08e7ce2f9a 1812 + // eadf183c3600b8b92b91839dd3be6bcc560c752d
+1 -1
scripts/atomic/kerneldoc/sub_and_test
··· 1 1 cat <<EOF 2 2 /** 3 3 * ${class}${atomicname}() - atomic subtract and test if zero with ${desc_order} ordering 4 - * @i: ${int} value to add 4 + * @i: ${int} value to subtract 5 5 * @v: pointer to ${atomic}_t 6 6 * 7 7 * Atomically updates @v to (@v - @i) with ${desc_order} ordering.