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 --- 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