RE: [Intel-wired-lan] [PATCH v2 14/25] kdoc_parser: handle struct member macro VIRTIO_DECLARE_FEATURES(name)
From: Loktionov, Aleksandr <hidden>
Date: 2026-01-28 17:47:49
Also in:
bpf, intel-wired-lan, linux-doc, lkml
quoted hunk ↗ jump to hunk
-----Original Message----- From: Intel-wired-lan <redacted> On Behalf Of Mauro Carvalho Chehab Sent: Wednesday, January 28, 2026 5:50 PM To: Jonathan Corbet <corbet@lwn.net>; Linux Doc Mailing List <linux- doc@vger.kernel.org> Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>; bpf@vger.kernel.org; intel-wired-lan@lists.osuosl.org; linux- kernel@vger.kernel.org; netdev@vger.kernel.org; Peter Zijlstra [off-list ref]; Randy Dunlap [off-list ref]; Stephen Rothwell [off-list ref] Subject: [Intel-wired-lan] [PATCH v2 14/25] kdoc_parser: handle struct member macro VIRTIO_DECLARE_FEATURES(name) From: Randy Dunlap <redacted> 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 <redacted> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- tools/lib/python/kdoc/kdoc_parser.py | 1 + 1 file changed, 1 insertion(+)diff --git a/tools/lib/python/kdoc/kdoc_parser.pyb/tools/lib/python/kdoc/kdoc_parser.py index 33710c4be145..db140363104a 100644--- a/tools/lib/python/kdoc/kdoc_parser.py +++ b/tools/lib/python/kdoc/kdoc_parser.py@@ -152,6 +152,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]; }'), ] # # Struct regexes here are guaranteed to have the end delimiter matching -- 2.52.0
Reviewed-by: Aleksandr Loktionov <redacted>