All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Alison Schofield <alison.schofield@intel.com>,
	Shuah Khan <skhan@linuxfoundation.org>
Cc: Alison Schofield <alison.schofield@intel.com>,
	linux-doc@vger.kernel.org, linux-cxl@vger.kernel.org
Subject: Re: [PATCH v2 2/2] docs: python: abi_regex: convert adjacent index placeholders
Date: Tue, 11 Aug 2026 10:40:50 -0600	[thread overview]
Message-ID: <87ldacliel.fsf@trenco.lwn.net> (raw)
In-Reply-To: <cc893dca3aaa3ec833ba70d1f32c3e7342b7faf2.1786139549.git.alison.schofield@intel.com>

Alison Schofield <alison.schofield@intel.com> writes:

> 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>
> ---
>
> 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_"),

Sigh ... these regexes are absolutely unreadable.  Not your fault, of
course, and I've applied the patch, but it sure would be nice to get
some documentation in there at some point.

Thanks,

jon

  reply	other threads:[~2026-08-11 16:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 22:10 [PATCH v2 1/2] docs: python: abi_regex: catch the right exception for a bad regex Alison Schofield
2026-08-07 22:10 ` [PATCH v2 2/2] docs: python: abi_regex: convert adjacent index placeholders Alison Schofield
2026-08-11 16:40   ` Jonathan Corbet [this message]
2026-08-11 16:40 ` [PATCH v2 1/2] docs: python: abi_regex: catch the right exception for a bad regex Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ldacliel.fsf@trenco.lwn.net \
    --to=corbet@lwn.net \
    --cc=alison.schofield@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.