[PATCH v2 2/2] docs: python: abi_regex: convert adjacent index placeholders
Alison Schofield <[email protected]>
| Newsgroups | org.kernel.vger.linux-doc,org.kernel.vger.linux-cxl |
|---|---|
| Message-ID | <cc893dca3aaa3ec833ba70d1f32c3e7342b7faf2.1786139549.git.alison.schofield@intel.com> |
While validating recent CXL ABI documentation updates with get_abi.py, every decoderX.Y entry was reported as undocumented. The placeholder conversion mishandles adjacent index placeholders, producing patterns that cannot match the corresponding sysfs paths. As a result, valid ABI entries are reported as undocumented. Handle adjacent placeholders independently so generated patterns match the documented paths. This fixes decoderX.Y entries in the CXL ABI and other ABI documentation that uses the same naming convention. Signed-off-by: Alison Schofield <[email protected]> --- Changes in v2: - No changes tools/lib/python/abi/abi_regex.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/lib/python/abi/abi_regex.py b/tools/lib/python/abi/abi_regex.py index 69d8507b7382..198ecbf49c51 100644 --- a/tools/lib/python/abi/abi_regex.py +++ b/tools/lib/python/abi/abi_regex.py @@ -65,8 +65,7 @@ class AbiRegex(AbiParser): (re.compile(r"\[[^\]]+\]"), "\\\\w\xf7"), (re.compile(r"XX+"), "\\\\w\xf7"), - (re.compile(r"([^A-Z])[XYZ]([^A-Z])"), "\\1\\\\w\xf7\\2"), - (re.compile(r"([^A-Z])[XYZ]$"), "\\1\\\\w\xf7"), + (re.compile(r"(?<![A-Z])[XYZ](?![A-Z])"), "\\\\w\xf7"), (re.compile(r"_[AB]_"), "_\\\\w\xf7_"), # Recover [0-9] type of patterns -- 2.37.3