<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/kernel-doc, branch v6.18</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-04-09T18:10:34Z</updated>
<entry>
<title>scripts/kernel-doc: switch to use kernel-doc.py</title>
<updated>2025-04-09T18:10:34Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-04-08T10:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc862949a35aa4d5e92a10c64c620cde350bd511'/>
<id>urn:sha1:fc862949a35aa4d5e92a10c64c620cde350bd511</id>
<content type='text'>
Now that all features are in place, change the kernel-doc alias
to point to kernel-doc.py.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/d84a2ad282821928a60b8dcbec305ef7e7bd58e6.1744106242.git.mchehab+huawei@kernel.org
</content>
</entry>
<entry>
<title>scripts/kernel-doc: add a symlink to the Perl version of kernel-doc</title>
<updated>2025-04-09T18:10:32Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-04-08T10:09:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=33a92a5b2e6fae8d653faaa0271111b3237af1f3'/>
<id>urn:sha1:33a92a5b2e6fae8d653faaa0271111b3237af1f3</id>
<content type='text'>
Preserve kernel-doc name, associating with the curent version
in Perl.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/a5d69e436287433ad8be066c648a77ffe493c21c.1744106241.git.mchehab+huawei@kernel.org
</content>
</entry>
<entry>
<title>scripts/kernel-doc: rename it to scripts/kernel-doc.pl</title>
<updated>2025-04-09T18:10:32Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-04-08T10:09:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb6749b961b684701a5d4bc905c4923407017c88'/>
<id>urn:sha1:cb6749b961b684701a5d4bc905c4923407017c88</id>
<content type='text'>
In preparation for deprecating scripts/kernel-doc in favor of a
new version written in Perl, rename it to scripts/kernel-doc.pl.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/a8a86136bcf102495f09c24a65817f1600fae0e8.1744106241.git.mchehab+huawei@kernel.org
</content>
</entry>
<entry>
<title>scripts/kernel-doc: drop dead code for Wcontents_before_sections</title>
<updated>2025-03-04T16:47:42Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-24T09:08:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19b100b0116d703b9529f7bbbf797428de51816a'/>
<id>urn:sha1:19b100b0116d703b9529f7bbbf797428de51816a</id>
<content type='text'>
There is a warning about contents before sections, which doesn't
work, since in_doc_sect variable is always true at the point
it is checked.

Drop the dead code.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/174a15607fd057c736dc9123c53d0835ce20e68b.1740387599.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: don't add not needed new lines</title>
<updated>2025-03-04T16:47:40Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-24T09:08:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9609ecba35ecf7fa85d9bcd519242009174e6a2'/>
<id>urn:sha1:b9609ecba35ecf7fa85d9bcd519242009174e6a2</id>
<content type='text'>
This helps comparing kernel-doc output with the new .py version
of it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/6b036ef7d746f26d7d0044626b04d1f0880a2188.1740387599.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: drop Sphinx version check</title>
<updated>2025-02-13T18:33:33Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-11T06:19:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=089e06c3f113a8641a6cf502a34284a7c0ca1630'/>
<id>urn:sha1:089e06c3f113a8641a6cf502a34284a7c0ca1630</id>
<content type='text'>
As the current minimal supported Sphinx version is 3.4.3, drop
support for older versions.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Reviewed-by: Kees Cook &lt;kees@kernel.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/0d002e7550476a68547ee53ad06cfd8fdcaf7c3a.1739254187.git.mchehab+huawei@kernel.org
</content>
</entry>
<entry>
<title>scripts/kernel-doc: remove an obscure logic from kernel-doc</title>
<updated>2025-02-13T16:44:24Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2025-02-12T06:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba561b485709b6160e56d1fe32a2717fffb332cc'/>
<id>urn:sha1:ba561b485709b6160e56d1fe32a2717fffb332cc</id>
<content type='text'>
Kernel-doc has an obscure logic that uses an external file
to map files via a .tmp_filelist.txt file stored at the current
directory. The rationale for such code predates git time,
as it was added on Kernel v2.4.5.5, with the following description:

	# 26/05/2001 -         Support for separate source and object trees.
	#              Return error code.
	#              Keith Owens &lt;kaos@ocs.com.au&gt;

from commit 396a6123577d ("v2.4.5.4 -&gt; v2.4.5.5") at the historic
tree:
	https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/

Support for separate source and object trees is now done on a different
way via make O=&lt;object&gt;.

There's no logic to create such file, so it sounds to me that this is
just dead code.

So, drop it.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/fd3b28dec36ba1668325d6770d4c4754414337fc.1739340170.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>scripts/kernel-doc: fix identifier parsing regex</title>
<updated>2024-12-30T18:15:10Z</updated>
<author>
<name>Vegard Nossum</name>
<email>vegard.nossum@oracle.com</email>
</author>
<published>2024-12-21T22:22:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da3ecf00ffc7b169b9a31a1218bbb52aa19d8df7'/>
<id>urn:sha1:da3ecf00ffc7b169b9a31a1218bbb52aa19d8df7</id>
<content type='text'>
John wrote:

&gt; kernel-doc gets confused by code like the following:
&gt;
&gt; /**
&gt;  * define HOMA_MIN_DEFAULT_PORT - The 16-bit port space is divided into
&gt;  * two nonoverlapping regions. Ports 1-32767 are reserved exclusively
&gt;  * for well-defined server ports. The remaining ports are used for client
&gt;  * ports; these are allocated automatically by Homa. Port 0 is reserved.
&gt;  */
&gt; #define HOMA_MIN_DEFAULT_PORT 0x8000
&gt;
&gt; It seems to use the last "-" on the line (the one in "16-bit") rather
&gt; than the first one, so it produces the following false error message:
&gt;
&gt; homa.h:50: warning: expecting prototype for HOMA_MIN_DEFAULT_PORT -
&gt; The 16(). Prototype was for HOMA_MIN_DEFAULT_PORT() instead
&gt;
&gt; There are similar problems if there is a ":" later on the line.

The problem is the regex for the identifier, which is a greedy /.*/ that
matches everything up to the last - or : (i.e. $decl_end). Fix it by
tightening up this regex and not matching those characters as part of the
identifier.

Link: https://lore.kernel.org/all/CAGXJAmzfRzE=A94NT5ETtj3bZc-=2oLg-9E5Kjh4o_-iuw1q8g@mail.gmail.com/
Reported-by: John Ousterhout &lt;ouster@cs.stanford.edu&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20241221222214.1969823-1-vegard.nossum@oracle.com
</content>
</entry>
<entry>
<title>scripts/kernel-doc: Get -export option working again</title>
<updated>2024-12-11T16:15:26Z</updated>
<author>
<name>Akira Yokosawa</name>
<email>akiyks@gmail.com</email>
</author>
<published>2024-12-10T11:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9339496729f1471b8dc326face17c4cf108b027'/>
<id>urn:sha1:d9339496729f1471b8dc326face17c4cf108b027</id>
<content type='text'>
Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string
literal"), exported symbols marked by EXPORT_SYMBOL_NS(_GPL) are
ignored by "kernel-doc -export" in fresh build of "make htmldocs".

This is because regex in the perl script for those markers fails to
match the new signatures:

  - EXPORT_SYMBOL_NS(symbol, "ns");
  - EXPORT_SYMBOL_NS_GPL(symbol, "ns");

Update the regex so that it matches quoted string.

Note: Escape sequence of \w is good for C identifiers, but can be
too strict for quoted strings.  Instead, use \S, which matches any
non-whitespace character, for compatibility with possible extension
of namespace convention in the future [1].

Fixes: cdd30ebb1b9f ("module: Convert symbol namespace to string literal")
Link: https://lore.kernel.org/CAK7LNATMufXP0EA6QUE9hBkZMa6vJO6ZiaYuak2AhOrd2nSVKQ@mail.gmail.com/ [1]
Signed-off-by: Akira Yokosawa &lt;akiyks@gmail.com&gt;
Cc: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Tested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/e5c43f36-45cd-49f4-b7b8-ff342df3c7a4@gmail.com
</content>
</entry>
<entry>
<title>kernel-doc: allow object-like macros in ReST output</title>
<updated>2024-10-17T15:33:29Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2024-10-15T18:11:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb8fd09e2811e2386bb40b9f0d3c7dd6e7961a1e'/>
<id>urn:sha1:bb8fd09e2811e2386bb40b9f0d3c7dd6e7961a1e</id>
<content type='text'>
output_function_rst() does not handle object-like macros. It presents
a trailing "()" while output_function_man() handles these macros
correctly.

Update output_function_rst() to handle object-like macros.
Don't show the "Parameters" heading if there are no parameters.

For output_function_man(), don't show the "ARGUMENTS" heading if there
are no parameters.

I have tested this quite a bit with my ad hoc test files for both ReST
and man format outputs. The generated output looks good.

Fixes: cbb4d3e6510b ("scripts/kernel-doc: handle object-like macros")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Horia Geanta &lt;horia.geanta@freescale.com&gt;
Tested-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Link: https://lore.kernel.org/r/20241015181107.536894-1-rdunlap@infradead.org
</content>
</entry>
</feed>
