* [PATCH] kdoc: xforms: move context attrs to function_xforms list
@ 2026-05-05 22:15 Randy Dunlap
2026-05-15 14:20 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2026-05-05 22:15 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Jonathan Corbet, Shuah Khan, linux-doc,
Mauro Carvalho Chehab
The context analysis macros are function attributes that should be
in the function_xforms list. Somewhere along the way they were
inserted into the struct_xforms list instead. This causes docs build
warnings to continue to be emitted for context macros.
Move the context analysis macros to the function_xforms list where
they should be to eliminate these warnings.
Documentation/core-api/kref:328: ../include/linux/kref.h:72: WARNING: Invalid C declaration: Expected end of definition. [error at 96]
int kref_put_mutex (struct kref *kref, void (*release)(struct kref *kref), struct mutex *mutex) __cond_acquires(true# mutex)
Documentation/core-api/kref:328: ../include/linux/kref.h:94: WARNING: Invalid C declaration: Expected end of definition. [error at 92]
int kref_put_lock (struct kref *kref, void (*release)(struct kref *kref), spinlock_t *lock) __cond_acquires(true# lock)
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-doc@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
tools/lib/python/kdoc/xforms_lists.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--- linux-next.orig/tools/lib/python/kdoc/xforms_lists.py
+++ linux-next/tools/lib/python/kdoc/xforms_lists.py
@@ -48,16 +48,6 @@ class CTransforms:
(CMatch("DEFINE_DMA_UNMAP_ADDR"), r"dma_addr_t \1"),
(CMatch("DEFINE_DMA_UNMAP_LEN"), r"__u32 \1"),
(CMatch("VIRTIO_DECLARE_FEATURES"), r"union { u64 \1; u64 \1_array[VIRTIO_FEATURES_U64S]; }"),
- (CMatch("__cond_acquires"), ""),
- (CMatch("__cond_releases"), ""),
- (CMatch("__acquires"), ""),
- (CMatch("__releases"), ""),
- (CMatch("__must_hold"), ""),
- (CMatch("__must_not_hold"), ""),
- (CMatch("__must_hold_shared"), ""),
- (CMatch("__cond_acquires_shared"), ""),
- (CMatch("__acquires_shared"), ""),
- (CMatch("__releases_shared"), ""),
(CMatch("__attribute__"), ""),
#
@@ -98,6 +88,16 @@ class CTransforms:
(CMatch("__(?:re)?alloc_size"), ""),
(CMatch("__diagnose_as"), ""),
(CMatch("DECL_BUCKET_PARAMS"), r"\1, \2"),
+ (CMatch("__cond_acquires"), ""),
+ (CMatch("__cond_releases"), ""),
+ (CMatch("__acquires"), ""),
+ (CMatch("__releases"), ""),
+ (CMatch("__must_hold"), ""),
+ (CMatch("__must_not_hold"), ""),
+ (CMatch("__must_hold_shared"), ""),
+ (CMatch("__cond_acquires_shared"), ""),
+ (CMatch("__acquires_shared"), ""),
+ (CMatch("__releases_shared"), ""),
(CMatch("__no_context_analysis"), ""),
(CMatch("__attribute_const__"), ""),
(CMatch("__attribute__"), ""),
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] kdoc: xforms: move context attrs to function_xforms list
2026-05-05 22:15 [PATCH] kdoc: xforms: move context attrs to function_xforms list Randy Dunlap
@ 2026-05-15 14:20 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2026-05-15 14:20 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Randy Dunlap, Shuah Khan, linux-doc, Mauro Carvalho Chehab
Randy Dunlap <rdunlap@infradead.org> writes:
> The context analysis macros are function attributes that should be
> in the function_xforms list. Somewhere along the way they were
> inserted into the struct_xforms list instead. This causes docs build
> warnings to continue to be emitted for context macros.
>
> Move the context analysis macros to the function_xforms list where
> they should be to eliminate these warnings.
>
> Documentation/core-api/kref:328: ../include/linux/kref.h:72: WARNING: Invalid C declaration: Expected end of definition. [error at 96]
> int kref_put_mutex (struct kref *kref, void (*release)(struct kref *kref), struct mutex *mutex) __cond_acquires(true# mutex)
> Documentation/core-api/kref:328: ../include/linux/kref.h:94: WARNING: Invalid C declaration: Expected end of definition. [error at 92]
> int kref_put_lock (struct kref *kref, void (*release)(struct kref *kref), spinlock_t *lock) __cond_acquires(true# lock)
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: linux-doc@vger.kernel.org
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
>
> tools/lib/python/kdoc/xforms_lists.py | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-15 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 22:15 [PATCH] kdoc: xforms: move context attrs to function_xforms list Randy Dunlap
2026-05-15 14:20 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox