]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scripts/kernel_doc.py: properly handle VIRTIO_DECLARE_FEATURES
authorPaolo Abeni <pabeni@redhat.com>
Tue, 8 Jul 2025 15:54:46 +0000 (17:54 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Jul 2025 16:04:39 +0000 (18:04 +0200)
The mentioned macro introduce by the next patch will foul kdoc;
fully expand the mentioned macro to avoid the issue.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
scripts/lib/kdoc/kdoc_parser.py

index 062453eefc7a3e8c569883c4a601ce928f45be84..3115558925acf517605dea1437f1ec8620b8d552 100644 (file)
@@ -666,6 +666,7 @@ class KernelDoc:
             (KernRe(r'(?:__)?DECLARE_FLEX_ARRAY\s*\(' + args_pattern + r',\s*' + args_pattern + r'\)', re.S), r'\1 \2[]'),
             (KernRe(r'DEFINE_DMA_UNMAP_ADDR\s*\(' + args_pattern + r'\)', re.S), r'dma_addr_t \1'),
             (KernRe(r'DEFINE_DMA_UNMAP_LEN\s*\(' + args_pattern + r'\)', re.S), r'__u32 \1'),
+            (KernRe(r'VIRTIO_DECLARE_FEATURES\s*\(' + args_pattern + r'\)', re.S), r'u64 \1; u64 \1_array[VIRTIO_FEATURES_DWORDS]'),
         ]
 
         # Regexes here are guaranteed to have the end limiter matching