summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2026-03-02 17:40:53 +0100
committerJonathan Corbet <corbet@lwn.net>2026-03-03 10:47:24 -0700
commit97d4e70bc2c6f75911a9a5e1a75f2de13fde9b6b (patch)
tree2bf04323c07596c6490116a116c1c63084b61274 /tools/lib/python/kdoc
parent9bff5121fe22fdd0bb5bd6f744e136ec20bf7b95 (diff)
downloadlwn-97d4e70bc2c6f75911a9a5e1a75f2de13fde9b6b.tar.gz
lwn-97d4e70bc2c6f75911a9a5e1a75f2de13fde9b6b.zip
docs: kdoc_parser: handle struct member macro VIRTIO_DECLARE_FEATURES(name)
Parse the macro VIRTIO_DECLARE_FEATURES(name) and expand it to its definition. These prevents one build warning: WARNING: include/linux/virtio.h:188 struct member 'VIRTIO_DECLARE_FEATURES(features' not described in 'virtio_device' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <6f62e1f1210e74906fa50f4e937f66f54813661b.1772469446.git.mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
-rw-r--r--tools/lib/python/kdoc/kdoc_parser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/python/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py
index 1df869061bf3..917e4528bfbf 100644
--- a/tools/lib/python/kdoc/kdoc_parser.py
+++ b/tools/lib/python/kdoc/kdoc_parser.py
@@ -150,6 +150,7 @@ struct_xforms = [
struct_args_pattern + r'\)', re.S), r'\1 \2[]'),
(KernRe(r'DEFINE_DMA_UNMAP_ADDR\s*\(' + struct_args_pattern + r'\)', re.S), r'dma_addr_t \1'),
(KernRe(r'DEFINE_DMA_UNMAP_LEN\s*\(' + struct_args_pattern + r'\)', re.S), r'__u32 \1'),
+ (KernRe(r'VIRTIO_DECLARE_FEATURES\(([\w_]+)\)'), r'union { u64 \1; u64 \1_array[VIRTIO_FEATURES_U64S]; }'),
]
#
# Regexes here are guaranteed to have the end delimiter matching