mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 07:13:56 -04:00
docs: kdoc_parser: move nested match transforms to xforms_lists.py
As NestedMatch now has a sub method and a declaration close to what KernRe does, we can move the rules to xforms_lists and simplify kdoc_parser a little bit. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <762ce2a58ff024c1b0b6f6a6e05020d1415b8308.1772469446.git.mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Jonathan Corbet
parent
fc44c0a0b2
commit
85c2a51357
@@ -4,7 +4,7 @@
|
||||
|
||||
import re
|
||||
|
||||
from kdoc.kdoc_re import KernRe
|
||||
from kdoc.kdoc_re import KernRe, NestedMatch
|
||||
|
||||
struct_args_pattern = r'([^,)]+)'
|
||||
|
||||
@@ -94,6 +94,18 @@ class CTransforms:
|
||||
(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]; }'),
|
||||
|
||||
(NestedMatch(r"__cond_acquires\s*\("), ""),
|
||||
(NestedMatch(r"__cond_releases\s*\("), ""),
|
||||
(NestedMatch(r"__acquires\s*\("), ""),
|
||||
(NestedMatch(r"__releases\s*\("), ""),
|
||||
(NestedMatch(r"__must_hold\s*\("), ""),
|
||||
(NestedMatch(r"__must_not_hold\s*\("), ""),
|
||||
(NestedMatch(r"__must_hold_shared\s*\("), ""),
|
||||
(NestedMatch(r"__cond_acquires_shared\s*\("), ""),
|
||||
(NestedMatch(r"__acquires_shared\s*\("), ""),
|
||||
(NestedMatch(r"__releases_shared\s*\("), ""),
|
||||
(NestedMatch(r'\bSTRUCT_GROUP\('), r'\0'),
|
||||
]
|
||||
|
||||
#: Transforms for function prototypes.
|
||||
|
||||
Reference in New Issue
Block a user