<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/tools/lib/python/kdoc/kdoc_re.py, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/tools/lib/python/kdoc/kdoc_re.py?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/tools/lib/python/kdoc/kdoc_re.py?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-03-22T21:10:40Z</updated>
<entry>
<title>docs: kdoc_re: better represent long regular expressions</title>
<updated>2026-03-22T21:10:40Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-18T09:11:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b2d231f4a77800661b3fb812d997841a548c6526'/>
<id>urn:sha1:b2d231f4a77800661b3fb812d997841a548c6526</id>
<content type='text'>
The Sphinx output from autodoc doesn't automatically break long
lines, except on spaces.

Change KernRe __repr__() to break the pattern on multiple strings,
each one with a maximum limit of 60 characters.

With that, documentation output for KernRe should now be displayable,
even on long strings.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;60c264a9d277fed655b1a62df2195562c8596090.1773823995.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: get rid of NestedMatch class</title>
<updated>2026-03-22T21:02:29Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-17T18:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ae63a5b9203bcb3dce4819c07409b27734180eea'/>
<id>urn:sha1:ae63a5b9203bcb3dce4819c07409b27734180eea</id>
<content type='text'>
Now that everything was converted to CMatch, we can get rid of
the previous NestedMatch implementation.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;c82dd0d2c0ab330fc04925965091c448ccabb8fd.1773770483.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: make NestedMatch use KernRe</title>
<updated>2026-03-03T17:47:25Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-02T16:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=fc44c0a0b2a72f2e9331063a311a548634ae18af'/>
<id>urn:sha1:fc44c0a0b2a72f2e9331063a311a548634ae18af</id>
<content type='text'>
Instead of using re_compile, let's create the class with the
regex and use KernRe to keep it cached.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;cdf900faf0ed8a08f8c6ac1db5a43342968c0739.1772469446.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: Change NestedMath args replacement to \0</title>
<updated>2026-03-03T17:47:25Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-02T16:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=34503b5fd10d8c7f1b1f4fecb6aae826fcf79424'/>
<id>urn:sha1:34503b5fd10d8c7f1b1f4fecb6aae826fcf79424</id>
<content type='text'>
Future patches will allow parsing each argument instead of the
hole set. Prepare for it by changing the replace all args from
\1 to \0.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;46e383118be9d9e432e3814fe819ebb12261d7b4.1772469446.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: don't recompile NestedMatch regex every time</title>
<updated>2026-03-03T17:47:25Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-02T16:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=962bdc440df58008e0319d6cbe08c4ca1193c112'/>
<id>urn:sha1:962bdc440df58008e0319d6cbe08c4ca1193c112</id>
<content type='text'>
Store delimiters and its regex-compiled version as const vars.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;0cf2b72d4785aa8b727188b56688ff442d1c65ce.1772469446.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: handle strings and escape chars on NextMatch</title>
<updated>2026-03-03T17:47:25Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-02T16:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=134468b0e2043efec4bd25dc6bcef238358a8111'/>
<id>urn:sha1:134468b0e2043efec4bd25dc6bcef238358a8111</id>
<content type='text'>
The logic inside NestedMatch currently doesn't consider that
function arguments may have chars and strings, which may
eventually contain delimiters.

Add logic to handle strings and escape characters on them.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;ac25335bc2d09649e17d1c86c17d3f8f2e8ec27c.1772469446.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: better show KernRe() at documentation</title>
<updated>2026-03-03T17:47:25Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-02T16:40:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=95a9429cc6d31371575793ab7beb94bf3e7a2f92'/>
<id>urn:sha1:95a9429cc6d31371575793ab7beb94bf3e7a2f92</id>
<content type='text'>
the __repr__() function is used by autodoc to document macro
initialization.

Add a better representation for them.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;80d27732368c14125c1b76048a70d8b4aee527ef.1772469446.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: don't go past the end of a line</title>
<updated>2026-03-03T17:47:24Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-02T16:40:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8eb49357ffa229c9b65a002f655c1280dc09769a'/>
<id>urn:sha1:8eb49357ffa229c9b65a002f655c1280dc09769a</id>
<content type='text'>
The logic which checks if the line ends with ";" is currently
broken: it may try to read past the buffer.

Fix it by checking before trying to access line[pos].

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;bce51ba0260a053a0ec55a7375d6ed7a7c08026c.1772469446.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_re: add support for groups()</title>
<updated>2026-03-03T17:47:24Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-02T16:40:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2b144a30a407d29b7e6d24549f5316175115e788'/>
<id>urn:sha1:2b144a30a407d29b7e6d24549f5316175115e788</id>
<content type='text'>
Add an equivalent to re groups() method.
This is useful on debug messages.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reviewed-by: Aleksandr Loktionov &lt;aleksandr.loktionov@intel.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20d1a9c77200e28cc2ff1d6122635c43f8ba6a71.1772469446.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc: Fix pdfdocs build for tools</title>
<updated>2026-02-02T16:57:46Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-01-27T08:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=98f51c466aebdb5afa7cb7d54aa7eb9f04b468ee'/>
<id>urn:sha1:98f51c466aebdb5afa7cb7d54aa7eb9f04b468ee</id>
<content type='text'>
the "\1" inside a docstring requires proper scaping to not be
considered a hex character and break the build.

Reported-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Closes: https://lore.kernel.org/linux-doc/63e99049-cc72-4156-83af-414fdde34312@gmail.com/
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;2fff8ef1d0d64e8b68f15f5c07613f302d773855.1769500383.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
</feed>
