[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50ef80ed8a1a638d08974e55a7828371bab09c0d.1769673038.git.mchehab+huawei@kernel.org>
Date: Thu, 29 Jan 2026 09:08:18 +0100
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Alexander Lobakin <aleksander.lobakin@...el.com>,
Jonathan Corbet <corbet@....net>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
bpf@...r.kernel.org,
intel-wired-lan@...ts.osuosl.org,
linux-hardening@...r.kernel.org,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Randy Dunlap <rdunlap@...radead.org>
Subject: [PATCH v3 27/30] docs: kdoc_parser: minimize differences with struct_group_tagged
While the previous version does a better job representing
the actual struct, it ends losing documentation from each
member.
Change the replacements to minimize such changes. With that,
the only differences before/after using NestedMatch new
replacement logic are (at man page output):
--- before.log 2026-01-29 06:14:20.163592584 +0100
+++ after.log 2026-01-29 06:32:04.811370234 +0100
@@ -1573701 +1573701 @@
-.BI " struct ice_health_tx_hang_buf tx_hang_buf;"
+.BI " struct ice_health_tx_hang_buf tx_hang_buf;"
@@ -4156451 +4156451 @@
-.BI " struct libeth_fq_fp fp;"
+.BI " struct libeth_fq_fp fp;"
@@ -4164041 +4164041 @@
-.BI " struct libeth_xskfq_fp fp;"
+.BI " struct libeth_xskfq_fp fp;"
@@ -4269434 +4269434 @@
-.BI " struct page_pool_params_fast fast;"
+.BI " struct page_pool_params_fast fast;"
@@ -4269452 +4269452 @@
-.BI " struct page_pool_params_slow slow;"
+.BI " struct page_pool_params_slow slow;"
@@ -4269454 +4269454 @@
-.BI " STRUCT_GROUP( struct net_device *netdev;"
+.BI " struct net_device *netdev;"
e.g. basically whitespaces, plus a fix NestedMatch to
better handle /* private */ comments.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
tools/lib/python/kdoc/kdoc_parser.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/python/kdoc/kdoc_parser.py b/tools/lib/python/kdoc/kdoc_parser.py
index 50d57c6799bb..1e8e156e2a9e 100644
--- a/tools/lib/python/kdoc/kdoc_parser.py
+++ b/tools/lib/python/kdoc/kdoc_parser.py
@@ -126,7 +126,7 @@ struct_xforms = [
#
(CFunction('struct_group'), r'\2'),
(CFunction('struct_group_attr'), r'\3'),
- (CFunction('struct_group_tagged'), r'struct \1 { \3 } \2;'),
+ (CFunction('struct_group_tagged'), r'struct \1 \2; \3'),
(CFunction('__struct_group'), r'\4'),
#
--
2.52.0
Powered by blists - more mailing lists