<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/tools/lib/python/kdoc/kdoc_item.py, branch docs-next</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-next</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-next'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2026-03-25T19:36:46+00:00</updated>
<entry>
<title>docs: kdoc: better handle source when producing YAML output</title>
<updated>2026-03-25T19:36:46+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-23T09:10:50+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=99ec67a9984fdf38c7ed78695aeb1b99cfee5b50'/>
<id>urn:sha1:99ec67a9984fdf38c7ed78695aeb1b99cfee5b50</id>
<content type='text'>
The current logic was storing symbols source code on a list,
not linked to the actual KdocItem. While this works fine when
kernel-doc markups are OK, on places where there is a "/**"
without a valid kernel-doc markup, it ends that the 1:1 match
between source code and KdocItem doesn't happen, causing
problems to generate the YAML output.

Fix it by storing the source code directly into the KdocItem
structure.

This shouldn't affect performance or memory footprint, except
when --yaml option is used.

While here, add a __repr__() function for KdocItem, as it
helps debugging it.

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;77902dafabb5c3250486aa2dc1568d5fafa95c5b.1774256269.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_item: fix a typo on sections_start_lines</title>
<updated>2026-03-22T21:10:40+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-18T09:11:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e394855fcc897f73f23c364a3a596b54cc879e4c'/>
<id>urn:sha1:e394855fcc897f73f23c364a3a596b54cc879e4c</id>
<content type='text'>
Currently, there are 15 occurrences of section?_start_lines,
with 10 using the plural way.

This is an issue, as, while kdoc_output works with KdocItem,
the term doesn't match its init value.

The variable sections_start_lines stores multiple sections,
so placing it in plural is its correct way.

So, ensure that, on all parts of kdoc, this will be referred
as sections_start_lines.

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;d1e0f1d3f80df41c11a1bbde6a12fd9468bc3813.1773823995.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_item: add support to generate a KdocItem from a dict</title>
<updated>2026-03-22T21:10:40+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-18T09:11:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=99364ba7f8dca5c1c2d08fe37c5835b86be141f4'/>
<id>urn:sha1:99364ba7f8dca5c1c2d08fe37c5835b86be141f4</id>
<content type='text'>
When reading the contents on a KdocItem using YAML, the data
will be imported into a dict.

Add a method to create a new KdocItem from a dict to allow
converting such input into a real KdocItem.

While here, address an issue that, if the class is initialized
with an internal parameter outside the 4 initial arguments,
it would end being added inside other_stuff, which breaks
initializing it from a dict.

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;fafeac23d1577927e1a3c32cddfbec1e0209ac73.1773823995.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_item: fix initial value for parameterdesc_start_lines</title>
<updated>2026-03-22T21:10:40+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-03-18T09:11:06+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=01c41b99c66ff26a102edbc4f9dff9c74692723e'/>
<id>urn:sha1:01c41b99c66ff26a102edbc4f9dff9c74692723e</id>
<content type='text'>
Ensure that parameterdesc_start_lines is a dict at init time,
as this is how it will be set later on at the parser.

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;1b4ea24dd4cd82e6711e9be80168684427d74c30.1773823995.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: kdoc_item: Improve docstrings and comments</title>
<updated>2026-01-23T18:37:38+00:00</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2026-01-19T16:23:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f40bba94a4db923a0ef0355b3055403fc9975729'/>
<id>urn:sha1:f40bba94a4db923a0ef0355b3055403fc9975729</id>
<content type='text'>
In preparation to document kernel-doc module, improve its
documentation.

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;65a7c6bb318e7a8cbf5c115903d507568099151a.1768838938.git.mchehab+huawei@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: Move the python libraries to tools/lib/python</title>
<updated>2025-11-18T16:22:40+00:00</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2025-11-10T22:04:29+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=778b8ebe5192e7a7f00563a7456517dfa63e1d90'/>
<id>urn:sha1:778b8ebe5192e7a7f00563a7456517dfa63e1d90</id>
<content type='text'>
"scripts/lib" was always a bit of an awkward place for Python modules.  We
already have tools/lib; create a tools/lib/python, move the libraries
there, and update the users accordingly.

While at it, move the contents of tools/docs/lib.  Rather than make another
directory, just put these documentation-oriented modules under "kdoc".

Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20251110220430.726665-2-corbet@lwn.net&gt;
</content>
</entry>
</feed>
