summaryrefslogtreecommitdiff
path: root/tools/lib/python/abi
diff options
context:
space:
mode:
authorAlison Schofield <alison.schofield@intel.com>2026-08-07 15:10:04 -0700
committerJonathan Corbet <corbet@lwn.net>2026-08-11 10:36:28 -0600
commit47646ce123fbd07d7c4d8052831c35f58ffcd074 (patch)
treecacf4ad81907091863cf58e0e6013f9781cc4ab9 /tools/lib/python/abi
parent02299dcd203c55d12238c95f1d028f06b90f1c1e (diff)
downloadlinux-47646ce123fbd07d7c4d8052831c35f58ffcd074.tar.gz
linux-47646ce123fbd07d7c4d8052831c35f58ffcd074.zip
docs: python: abi_regex: convert adjacent index placeholders
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 <alison.schofield@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <cc893dca3aaa3ec833ba70d1f32c3e7342b7faf2.1786139549.git.alison.schofield@intel.com>
Diffstat (limited to 'tools/lib/python/abi')
-rw-r--r--tools/lib/python/abi/abi_regex.py3
1 files changed, 1 insertions, 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