docs: makefile: move rustdoc check to the build wrapper
The makefile logic to detect if rust is enabled is not working
the way it was expected: instead of using the current setup
for CONFIG_RUST, it uses a cached version from a previous build.
The root cause is that the current logic inside docs/Makefile
uses a cached version of CONFIG_RUST, from the last time a non
documentation target was executed. That's perfectly fine for
Sphinx build, as it doesn't need to read or depend on any
CONFIG_*.
So, instead of relying at the cache, move the logic to the
wrapper script and let it check the current content of .config,
to verify if CONFIG_RUST was selected.
Sasha Levin [Fri, 21 Nov 2025 18:00:09 +0000 (13:00 -0500)]
README: restructure with role-based documentation and guidelines
Reorganize README to provide targeted documentation paths for different user
roles including developers, researchers, security experts, and maintainers.
Randy Dunlap [Wed, 26 Nov 2025 06:17:52 +0000 (22:17 -0800)]
docs: kdoc_parser: use '@' for Excess enum value
kdoc is looking for "@value" here, so use that kind of string in the
warning message. The "%value" can be confusing.
This changes:
Warning: drivers/net/wireless/mediatek/mt76/testmode.h:92 Excess enum value '%MT76_TM_ATTR_TX_PENDING' description in 'mt76_testmode_attr'
to this:
Warning: drivers/net/wireless/mediatek/mt76/testmode.h:92 Excess enum value '@MT76_TM_ATTR_TX_PENDING' description in 'mt76_testmode_attr'
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251126061752.3497106-1-rdunlap@infradead.org>
docs: submitting-patches: Clarify that removal of Acks needs explanation too
The paragraph mentions only removal of Tested-by and Reviewed-by tags as
action needing mentioning in patch changelog, so some developers treat
it too literally. Acks, as a weaker form of review/approval, should
rarely be removed, but if that happens it should be explained as well.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251126081905.7684-2-krzysztof.kozlowski@oss.qualcomm.com>
Randy Dunlap [Thu, 27 Nov 2025 06:31:17 +0000 (22:31 -0800)]
docs: kdoc_parser: add data/function attributes to ignore
Recognize and ignore __rcu (in struct members), __private (in struct
members), and __always_unused (in function parameters) to prevent
kernel-doc warnings:
Warning: include/linux/rethook.h:38 struct member 'void (__rcu *handler' not described in 'rethook'
Warning: include/linux/hrtimer_types.h:47 Invalid param: enum hrtimer_restart (*__private function)(struct hrtimer *)
Warning: security/ipe/hooks.c:81 function parameter '__always_unused' not described in 'ipe_mmap_file'
Warning: security/ipe/hooks.c:109 function parameter '__always_unused' not described in 'ipe_file_mprotect'
There are more of these (in compiler_types.h, compiler_attributes.h)
that can be added as needed.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251127063117.150384-1-rdunlap@infradead.org>
Jonathan Corbet [Sat, 29 Nov 2025 15:09:58 +0000 (08:09 -0700)]
Merge tag 'Chinese-docs-6.19' of gitolite.kernel.org:pub/scm/linux/kernel/git/alexs/linux into tmp
Chinese translation docs for 6.19
This is the Chinese translation subtree for 6.19. It includes
the following changes:
- Add block part translations
- Update kbuild.rst translations
- Add more scsi translations and fixes
Jonathan Corbet [Fri, 21 Nov 2025 17:45:32 +0000 (10:45 -0700)]
Merge branch 'mauro' into docs-mw
Mauro says:
That's the final series to complete the migration of documentation
build: it converts get_feat from Perl to Python.
V2 is technically identical to v1: the only difference is that it
now uses tools/lib/python/feat to store the library logic.
With that, no Sphinx in-kernel extensions use fork anymore to call
ancillary scripts: everything is now importing Python methods
directly from the libraries.
There's nothing special on this conversion: it is a direct translation,
almost bug-compatible with the original version (*).
(*) I did solve two or three caveats on patch 1.
Most of the complexity of the script relies at the logic to produce
ReST tables. I do have here on my internal scripts a (somewhat) generic
formatter for ReST tables in Python. I was tempted to convert the logic
to use it, but, as this could cause regressions, I opted to not do it
right now, mainly because the matrix table logic is complex. Also,
I'm tempted to modify a little bit the output there, but extra tests
are required to see if PDF output would work with complex tables (I
remember I had a problem with that in the past). So, I'm postponing
such extra cleanup.
tools/docs/get_feat.py: convert get_feat.pl to Python
As we want to call Python code directly at the Sphinx extension,
convert get_feat.pl to Python.
The code was made to be (almost) bug-compatible with the Perl
version, with two exceptions:
1. Currently, Perl script outputs a wrong table if arch is set
to a non-existing value;
2. the ReST table output when --feat is used without --arch
has an invalid format, as the number of characters for the
table delimiters are wrong.
Those two bugs were fixed while testing the conversion.
Additionally, another caveat was solved:
the output when --feat is used without arch and the feature
doesn't exist doesn't contain an empty table anymore.
Jiakai Xu [Wed, 19 Nov 2025 06:57:27 +0000 (14:57 +0800)]
Documentation/admin-guide: fix typo and comment in cscope example
This patch updates the Linux documentation for cscope, fixing two issues:
1. Corrects the typo in the command line:
c"scope -d -p10 -> cscope -d -p10
2. Fixes the related documentation comment for clarity and correctness:
cscope by default cscope.out database.
->
cscope by default uses the cscope.out database.
Signed-off-by: Jiakai Xu <jiakaiPeanut@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251119065727.3500015-1-jiakaiPeanut@gmail.com>
ke zijie [Thu, 20 Nov 2025 02:27:28 +0000 (10:27 +0800)]
docs/zh_CN: Add data-integrity.rst translation
Translate .../block/data-integrity.rst into Chinese.
Add data-integrity into .../block/index.rst.
Update the translation through commit c6e56cf6b2e7
("block: move integrity information into queue_limits")
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn> Reviewed-by: WangYuli <wangyl5933@chinaunicom.cn> Signed-off-by: ke zijie <kezijie@leap-io-kernel.com> Signed-off-by: Alex Shi <alexs@kernel.org>
ke zijie [Thu, 20 Nov 2025 02:27:27 +0000 (10:27 +0800)]
docs/zh_CN: Add blk-mq.rst translation
Translate .../block/blk-mq.rst into Chinese.
Add blk-mq into .../block/index.rst.
Update the translation through commit 41bd33df4e18
("docs: block: blk-mq.rst: correct places -> place")
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn> Reviewed-by: WangYuli <wangyl5933@chinaunicom.cn> Signed-off-by: ke zijie <kezijie@leap-io-kernel.com> Signed-off-by: Alex Shi <alexs@kernel.org>
ke zijie [Thu, 20 Nov 2025 02:27:26 +0000 (10:27 +0800)]
docs/zh_CN: Add block/index.rst translation
Translate .../block/index.rst into Chinese and update subsystem-apis.rst
translation.
Update the translation through commit 56cdea92ed91
("Documentation/block: drop the request.rst file")
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn> Reviewed-by: WangYuli <wangyl5933@chinaunicom.cn> Signed-off-by: ke zijie <kezijie@leap-io-kernel.com> Signed-off-by: Alex Shi <alexs@kernel.org>
Chenguang Zhao [Mon, 17 Nov 2025 09:30:41 +0000 (17:30 +0800)]
docs/zh_CN: Update the Chinese translation of kbuild.rst
Finish the translation of kbuild/kbuild.rst.
Update to commit 5cbfb4da7e06 ("kbuild: doc: improve
KBUILD_BUILD_TIMESTAMP documentation")
Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn> Reviewed-by: WangYuli <wanyl5933@chinaunicom.cn> Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn> Signed-off-by: Alex Shi <alexs@kernel.org>
Jonathan Corbet [Tue, 18 Nov 2025 16:26:11 +0000 (09:26 -0700)]
Merge branch 'python-modules' into docs-mw
scripts/lib was always a bit of an awkward place for Python libraries; give
them a proper home under tools/lib/python. Put the modules from
tools/docs/lib there for good measure.
The second patch ties them into a single package namespace. It would be
more aesthetically pleasing to add a kernel layer, so we could say:
from kernel.kdoc import kdoc_parser
...and have the kernel-specific stuff clearly marked, but that means adding
an empty directory in the hierarchy, which isn't as pleasing.
There are some other "Python library" directories hidden in the kernel
tree; we may eventually want to encourage them to move as well.
Jonathan Corbet [Mon, 10 Nov 2025 22:04:30 +0000 (15:04 -0700)]
docs: bring some order to our Python module hierarchy
Now that we have tools/lib/python for our Python modules, turn them into
proper packages with a single namespace so that everything can just use
tools/lib/python in sys.path. No functional change.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251110220430.726665-3-corbet@lwn.net>
Jonathan Corbet [Mon, 10 Nov 2025 22:04:29 +0000 (15:04 -0700)]
docs: Move the python libraries to tools/lib/python
"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 <corbet@lwn.net>
Message-ID: <20251110220430.726665-2-corbet@lwn.net>
ke zijie [Sun, 16 Nov 2025 09:16:56 +0000 (17:16 +0800)]
docs: zh_CN: scsi: fix broken references in scsi-parameters.rst
0day CI reported several broken references under
Documentation/translations/zh_CN/scsi/scsi-parameters.rst.
These files do not exist under the translations directory.
The correct references are the original English documents under
Documentation/scsi/.
This patch updates all broken paths accordingly.
Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202511130315.WOiKJQTu-lkp@intel.com/ Signed-off-by: ke zijie <kezijie@leap-io-kernel.com> Signed-off-by: Alex Shi <alexs@kernel.org>
Since the beginning, SPHINXDIRS was meant to be used by any
subdirectory inside Documentation/ that contains a file named
index.rst on it. The typical usecase for SPHINXDIRS is help
building subsystem-specific documentation, without needing to
wait for the entire building (with can take 3 minutes with
Sphinx 8.x and above, and a lot more with older versions).
Yet, the documentation for such feature was written back in
2016, where almost all index.rst files were at the first
level (Documentation/*/index.rst).
Update the documentation to reflect the way it works.
scripts: docs: kdoc_files.py: don't consider symlinks as directories
As reported by Randy, currently kdoc_files can go into endless
looks when symlinks are used:
$ ln -s . Documentation/peci/foo
$ ./scripts/kernel-doc Documentation/peci/
...
File "/new_devel/docs/scripts/lib/kdoc/kdoc_files.py", line 52, in _parse_dir
if entry.is_dir():
~~~~~~~~~~~~^^
OSError: [Errno 40] Too many levels of symbolic links: 'Documentation/peci/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo'
Prevent that by not considering symlinks as directories.
Reported-by: Randy Dunlap <rdunlap@infradead.org> Closes: https://lore.kernel.org/linux-doc/80701524-09fd-4d68-8715-331f47c969f2@infradead.org/ Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <73c3450f34e2a4b42ef2ef279d7487c47d22e3bd.1763027622.git.mchehab+huawei@kernel.org>
C macro references are erroneously written using :c:macro:: (note the
double colon). This causes the references to be outputted as combination
of verbatim roles and italicized names instead.
Correct the syntax.
Fixes: dce548889650c1 ("Documentation: Add TI TPS6594 PFSM") Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104041812.31402-4-bagasdotme@gmail.com>
C macro references are erroneously written using :c:macro:: (note the
double colon). This causes the references to be outputted as combination
of verbatim roles and italicized names instead.
Correct the syntax.
Fixes: 5f67eef6dff394 ("misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver") Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104041812.31402-3-bagasdotme@gmail.com>
Bagas Sanjaya [Tue, 4 Nov 2025 13:07:50 +0000 (20:07 +0700)]
Documentation: taskstats: Reindent payload kinds list
Payload kinds list text is indented at the first text column, rather
than aligned to the list number. As an effect, the third item becomes
sublist of second item's third sublist item (TASKTYPE_TYPE_STATS).
Reindent the list text.
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104130751.22755-1-bagasdotme@gmail.com>
Gou Hao [Wed, 5 Nov 2025 01:35:06 +0000 (09:35 +0800)]
xfs-doc: Fix typo error
Online fsck may take longer than offline fsck...
Signed-off-by: Gou Hao <gouhao@uniontech.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251105013506.358-1-gouhao@uniontech.com>
Bagas Sanjaya [Wed, 5 Nov 2025 12:49:47 +0000 (19:49 +0700)]
Documentation: parport-lowlevel: Separate function listing code blocks
Commit be9d0411f1608a ("parport-lowlevel.txt: standardize document
format") reSTify parport interface documentation but forgets to properly
mark function listing code blocks up. As such, these are rendered as
long-running normal paragraph instead.
Fix them by adding missing separator between the code block marker and
the listing.
Fixes: be9d0411f1608a ("parport-lowlevel.txt: standardize document format") Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251105124947.45048-1-bagasdotme@gmail.com>
pierwill [Sun, 9 Nov 2025 02:34:21 +0000 (02:34 +0000)]
docs: Fix missing word in spectre.rst
Corrects a missing word in the hardware vulnerability docs.
Signed-off-by: Will Pierce <pierwill@protonmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <Ru-d3ltJIyY4Oc6tzHwpSiDeFwSLHEzd7Utcr6iobgIy1B8wLRI4f6JiCb0a9n-0-r19d0dyLL3yS8KWVcyHfpkyDErWXYTkI3AJfUPTNCc=@protonmail.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251102060458.517911-1-rdunlap@infradead.org>
Randy Dunlap [Tue, 4 Nov 2025 05:09:30 +0000 (21:09 -0800)]
doc-guide: kernel-doc: add %CONST examples
Add examples of using '%' for formatting constant values to
facilitate more usage of "%CONST" in kernel-doc.
Suggested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104050930.720711-1-rdunlap@infradead.org>
docs: Makefile: Sort Documentation targets case-insensitively in make help
Avoid case-sensitive sorting when listing Documentation targets in make help.
Previously, targets like PCI and RCU appeared ahead of others due to uppercase
names.
Normalize casing during _SPHINXDIRS generation to ensure consistent and
intuitive ordering.
Fixes: 965fc39f7393 ("Documentation: sort _SPHINXDIRS for 'make help'") Tested-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Bhanu Seshu Kumar Valluri <bhanuseshukumar@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104061723.16629-1-bhanuseshukumar@gmail.com>
Tomas Glozar [Fri, 10 Oct 2025 08:33:38 +0000 (10:33 +0200)]
Documentation/rtla: Include defaults for tracer options
Commit 0122938a7ab4 ("rtla: Always set all tracer options") changed the
behavior of RTLA to always set all osnoise and timerlat tracer options
to default values taken from the tracers whenever an RTLA measurement
is started. The change was done to make RTLA results consistent on
subsequent runs of the same command.
Include the default values for tracer options also in documentation
where appropriate.
Signed-off-by: Tomas Glozar <tglozar@redhat.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251010083338.478961-10-tglozar@redhat.com>
Tomas Glozar [Fri, 10 Oct 2025 08:33:37 +0000 (10:33 +0200)]
Documentation/trace: Specify exact priority for timerlat
The timerlat tracer documentation mentions that threads are created with
real-time priority, but does not mention which priority and scheduling
class is used.
Add the information so that users do not have to look it up in
trace_osnoise.c.
Signed-off-by: Tomas Glozar <tglozar@redhat.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251010083338.478961-9-tglozar@redhat.com>
Tomas Glozar [Fri, 10 Oct 2025 08:33:36 +0000 (10:33 +0200)]
Documentation/rtla: Mention default cgroup state
The RTLA option -C/--cgroup is used to set a cgroup for workload
threads. This is either a specific cgroup, if passed an argument, or
rtla's cgroup, if no argument is given.
Expand the documentation of the -C option to also include the
information about the cgroup settings when the option is not specified.
Signed-off-by: Tomas Glozar <tglozar@redhat.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251010083338.478961-8-tglozar@redhat.com>
Tomas Glozar [Fri, 10 Oct 2025 08:33:35 +0000 (10:33 +0200)]
Documentation/rtla: Mention default priority
RTLA allows the priority of workload threads to be set using the -P
option. This is covered in docs, but the default state for RTLA's own
user workload (implemented in timerlat_u.c) is not mentioned.
Add mention of the default user workload priority as well as a reference
to osnoise and timerlat tracers for kernel workload priority.
Signed-off-by: Tomas Glozar <tglozar@redhat.com> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251010083338.478961-7-tglozar@redhat.com>
Andy Shevchenko [Tue, 4 Nov 2025 21:55:02 +0000 (22:55 +0100)]
kernel-doc: Issue warnings that were silently discarded
When kernel-doc parses the sections for the documentation some errors
may occur. In many cases the warning is simply stored to the current
"entry" object. However, in the most of such cases this object gets
discarded and there is no way for the output engine to even know about
that. To avoid that, check if the "entry" is going to be discarded and
if there warnings have been collected, issue them to the current logger
as is and then flush the "entry". This fixes the problem that original
Perl implementation doesn't have.
As of Linux kernel v6.18-rc4 the reproducer can be:
$ scripts/kernel-doc -v -none -Wall include/linux/util_macros.h
...
Info: include/linux/util_macros.h:138 Scanning doc for function to_user_ptr
...
while with the proposed change applied it gives one more line:
$ scripts/kernel-doc -v -none -Wall include/linux/util_macros.h
...
Info: include/linux/util_macros.h:138 Scanning doc for function to_user_ptr
Warning: include/linux/util_macros.h:144 expecting prototype for to_user_ptr(). Prototype was for u64_to_user_ptr() instead
...
And with the original Perl script:
$ scripts/kernel-doc.pl -v -none -Wall include/linux/util_macros.h
...
include/linux/util_macros.h:139: info: Scanning doc for function to_user_ptr
include/linux/util_macros.h:149: warning: expecting prototype for to_user_ptr(). Prototype was for u64_to_user_ptr() instead
...
Fixes: 9cbc2d3b137b ("scripts/kernel-doc.py: postpone warnings to the output plugin") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104215502.1049817-1-andriy.shevchenko@linux.intel.com>
Lukas Bulwahn [Mon, 3 Nov 2025 07:59:48 +0000 (08:59 +0100)]
MAINTAINERS: extend DOCUMENTATION SCRIPTS to the full directories
Due to commit abd61d1ff8f0 ("scripts: sphinx-pre-install: move it to
tools/docs"), checkpatch.pl --self-test=patterns reported a non-matching
file entry in DOCUMENTATION SCRIPTS. Clearly, there are now multiple
documentation scripts, all located in Documentation/sphinx/ and tools/docs/
and Mauro is the maintainer of those.
Update the DOCUMENTATION SCRIPTS section to cover these directories. While
at it, also make the DOCUMENTATION section cover the subdirectories of
tools/docs/.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251103075948.26026-1-lukas.bulwahn@redhat.com>
Jonathan Corbet [Mon, 3 Nov 2025 23:25:22 +0000 (16:25 -0700)]
Merge branch 'tools-final2' into docs-mw
Our documentation-related tools are spread out over various directories;
several are buried in the scripts/ dumping ground. That makes them harder
to discover and harder to maintain.
Recent work has started accumulating our documentation-related tools in
/tools/docs. This series nearly completes that task, moving most of the
rest of our various utilities there, hopefully fixing up all of the
relevant references in the process.
The one exception is scripts/kernel-doc; that move turned up some other
problems, so I have dropped it until those are ironed out.
At the end, rather than move the old, Perl kernel-doc, I simply removed it.
Bagas Sanjaya [Fri, 31 Oct 2025 04:33:56 +0000 (11:33 +0700)]
Documentation: treewide: Replace marc.info links with lore
In the past, people would link to third-party mailing list archives
(like marc.info) for any kernel-related discussions. Now that there
is lore archive under kernel.org infrastructure, replace these marc
links
Note that the only remaining marc link is "Re: Memory mapping on Cirrus
EP9315" [1] since that thread is not available at lore [2].
Jonathan Corbet [Mon, 3 Nov 2025 23:12:37 +0000 (16:12 -0700)]
Merge tag 'Chinese-docs-6.18' of gitolite.kernel.org:pub/scm/linux/kernel/git/alexs/linux into alex
Chinese translation docs for 6.18
This is the Chinese translation subtree for 6.18. It includes
the following changes:
- docs/zh_CN: Add rust Chinese translations
- docs/zh_CN: Add scsi Chinese translations
- docs/zh_CN: Add gfs2 Chinese translations
- Add some other Chinese translations and fixes
Alex Shi [Sun, 26 Oct 2025 13:29:35 +0000 (21:29 +0800)]
Revert "Docs/zh_CN: Translate skbuff.rst to Simplified Chinese"
This reverts commit d3e7609c6e5ec92587ed1043a985749d22cc78d1.
The commit cause a warning:
Documentation/networking/skbuff.rst:34: WARNING: duplicate label crc, other instance in Documentation/translations/zh_CN/networking/skbuff.rst
And there's no simple way to keep the meaningful doc context and avoid the
warning, so, let's remove the doc.
Jacob Keller [Thu, 30 Oct 2025 19:58:32 +0000 (12:58 -0700)]
docs: kdoc: fix duplicate section warning message
The python version of the kernel-doc parser emits some strange warnings
with just a line number in certain cases:
$ ./scripts/kernel-doc -Wall -none 'include/linux/virtio_config.h'
Warning: 174
Warning: 184
Warning: 190
Warning: include/linux/virtio_config.h:226 No description found for return value of '__virtio_test_bit'
Warning: include/linux/virtio_config.h:259 No description found for return value of 'virtio_has_feature'
Warning: include/linux/virtio_config.h:283 No description found for return value of 'virtio_has_dma_quirk'
Warning: include/linux/virtio_config.h:392 No description found for return value of 'virtqueue_set_affinity'
I eventually tracked this down to the lone call of emit_msg() in the
KernelEntry class, which looks like:
self.emit_msg(self.new_start_line, f"duplicate section name '{name}'\n")
This looks like all the other emit_msg calls. Unfortunately, the definition
within the KernelEntry class takes only a message parameter and not a line
number. The intended message is passed as the warning!
Pass the filename to the KernelEntry class, and use this to build the log
message in the same way as the KernelDoc class does.
To avoid future errors, mark the warning parameter for both emit_msg
definitions as a keyword-only argument. This will prevent accidentally
passing a string as the warning parameter in the future.
Also fix the call in dump_section to avoid an unnecessary additional
newline.
Fixes: e3b42e94cf10 ("scripts/lib/kdoc/kdoc_parser.py: move kernel entry to a class") Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251030-jk-fix-kernel-doc-duplicate-return-warning-v2-1-ec4b5c662881@intel.com>
Bagas Sanjaya [Wed, 22 Oct 2025 03:43:35 +0000 (10:43 +0700)]
Documentation: process: Also mention Sasha Levin as stable tree maintainer
Sasha has also maintaining stable branch in conjunction with Greg
since cb5d21946d2a2f ("MAINTAINERS: Add Sasha as a stable branch
maintainer"). Mention him in 2.Process.rst.
Cc: stable@vger.kernel.org Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251022034336.22839-1-bagasdotme@gmail.com>
Nadav Tasher [Sat, 25 Oct 2025 17:16:25 +0000 (20:16 +0300)]
docs: replace broken links in ramfs-rootfs-initramfs docs
http://www.uwsg.iu.edu/ doesn't seem to exist anymore.
I managed to find backups on archive.org, which helped me find
the right links on https://lore.kernel.org/.
http://freecode.com/projects/afio was also down, so I figured
it could be replaced with https://linux.die.net/man/1/afio.
Replace broken links to mailing list and aifo tool.
Signed-off-by: Nadav Tasher <tashernadav@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251025171625.33197-1-tashernadav@gmail.com>
Akira Yokosawa [Sun, 19 Oct 2025 14:24:51 +0000 (23:24 +0900)]
tools/docs/sphinx-build-wrapper: Emit $SPHINXOPTS later in args list
The option list to sphinx-build via SPHINXOPTS should have higher
priority than those the wrapper comes up with.
sphinx-build will choose the latest one if there are duplicates.
To restore the behavior of Makefile era, when the documentation builds
at https://www.kernel.org/doc/html/next/ had been depending on it,
reorder the flag list.
Jonathan Corbet [Wed, 13 Aug 2025 17:03:02 +0000 (11:03 -0600)]
docs: move checktransupdate.py to tools/docs
The checktranslate.py tool currently languishes in scripts/; move it to
tools/docs and update references accordingly.
Cc: Alex Shi <alexs@kernel.org> Cc: Yanteng Si <si.yanteng@linux.dev> Cc: Dongliang Mu <dzm91@hust.edu.cn> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Brian Norris [Fri, 17 Oct 2025 20:37:12 +0000 (13:37 -0700)]
docs: checkpatch: Drop networking comment style
Networking no longer has their own comment style, and checkpatch no
longer checks for this.
Signed-off-by: Brian Norris <briannorris@chromium.org> Suggested-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251017203719.1554224-2-briannorris@chromium.org>
Brian Norris [Fri, 17 Oct 2025 20:37:11 +0000 (13:37 -0700)]
docs: checkpatch: Align block comment style
Ironically, the block style comments in the checkpatch documentation are
not aligned properly. Correct that.
Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251017203719.1554224-1-briannorris@chromium.org>
Ally Heev [Mon, 20 Oct 2025 10:46:30 +0000 (16:16 +0530)]
Documentation: fix dev-tools broken links in translations
gdb and kgdb debugging documentation were moved to
Documentation/process/debugging/ as a part of
Commit d5af79c05e9382d38b8546dc5362381ce07ba3d1 ("Documentation: move
dev-tools debugging files to process/debugging/"), but translations/
were not updated. Fix them
Signed-off-by: Ally Heev <allyheev@gmail.com> Fixes: d5af79c05e938 ("Documentation: move dev-tools debugging files to process/debugging/") Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251020-aheev-fix-docs-dev-tools-broken-links-v2-1-7db64bf0405a@gmail.com>
common_*.rst files are snippets that are intended to be included by rtla
docs (rtla*.rst). common_options.rst in particular contains
substitutions which depend on other common_* includes, so building it
independently as reST source results in above errors.
Rename all common_*.rst files to common_*.txt to prevent Sphinx from
building these snippets as standalone reST source and update all include
references accordingly.
Link: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#substitutions Suggested-by: Tomas Glozar <tglozar@redhat.com> Suggested-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Gopi Krishna Menon <krishnagopi487@gmail.com> Reviewed-by: Tomas Glozar <tglozar@redhat.com> Fixes: 05b7e10687c6 ("tools/rtla: Add remaining support for osnoise actions") Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com> Link: https://lore.kernel.org/r/20251008184522.13201-1-krishnagopi487@gmail.com
[Bagas: massage commit message and apply trailers] Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251013092719.30780-2-bagasdotme@gmail.com>
Bagas Sanjaya [Mon, 13 Oct 2025 09:56:30 +0000 (16:56 +0700)]
Documentation: assoc_array: Indent function explanation text
Paragraphs of function explanation are currently not indented following
their appropriate numbered list item, which causes only the first
paragraph and function prototype code blocks to be indented in the
numbered list in htmldocs output.
Indent the explanation.
Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251013095630.34235-3-bagasdotme@gmail.com>
Jonathan Corbet [Fri, 17 Oct 2025 20:11:30 +0000 (14:11 -0600)]
Merge branch 'build-script' into docs-mw
Quoth Mauro:
This series should probably be called:
"Move the trick-or-treat build hacks accumulated over time
into a single place and document them."
as this reflects its main goal. As such:
- it places the jobserver logic on a library;
- it removes sphinx/parallel-wrapper.sh;
- the code now properly implements a jobserver-aware logic
to do the parallelism when called via GNU make, failing back to
"-j" when there's no jobserver;
- converts check-variable-fonts.sh to Python and uses it via
function call;
- drops an extra script to generate man pages, adding a makefile
target for it;
- ensures that return code is 0 when PDF successfully builds;
- about half of the script is comments and documentation.
I tried to do my best to document all tricks that are inside the
script. This way, the docs build steps is now documented.
It should be noticed that it is out of the scope of this series
to change the implementation. Surely the process can be improved,
but first let's consolidate and document everything on a single
place.
Such script was written in a way that it can be called either
directly or via a Makefile. Running outside Makefile is
interesting specially when debug is needed. The command line
interface replaces the need of having lots of env vars before
calling sphinx-build:
positional arguments:
{cleandocs,linkcheckdocs,htmldocs,epubdocs,texinfodocs,infodocs,mandocs,latexdocs,pdfdocs,xmldocs}
Documentation target to build
options:
-h, --help show this help message and exit
--sphinxdirs SPHINXDIRS [SPHINXDIRS ...]
Specific directories to build
--conf CONF Sphinx configuration file
--builddir BUILDDIR Sphinx configuration file
--theme THEME Sphinx theme to use
--css CSS Custom CSS file for HTML/EPUB
--paper {,a4,letter} Paper size for LaTeX/PDF output
-v, --verbose place build in verbose mode
-j, --jobs JOBS Sets number of jobs to use with sphinx-build
-i, --interactive Change latex default to run in interactive mode
-V, --venv [VENV] If used, run Sphinx from a venv dir (default dir: sphinx_latest)
the only mandatory argument is the target, which is identical with
"make" targets.
The call inside Makefile doesn't use the last four arguments. They're
there to help identifying problems at the build:
-v makes the output verbose;
-j helps to test parallelism;
-i runs latexmk in interactive mode, allowing to debug PDF
build issues;
-V is useful when testing it with different venvs.
When used with GNU make (or some other make which implements jobserver),
a call like:
make -j <targets> htmldocs
will make the wrapper to automatically use POSIX jobserver to claim
the number of available job slots, calling sphinx-build with a
"-j" parameter reflecting it. ON such case, the default can be
overriden via SPHINXDIRS argument.
Visiable changes when compared with the old behavior:
When V=0, the only visible difference is that:
- pdfdocs target now returns 0 on success, 1 on failures.
This addresses an issue over the current process where we
it always return success even on failures;
- it will now print the name of PDF files that failed to build,
if any.
In verbose mode, sphinx-build-wrapper and sphinx-build command lines
are now displayed.
Jonathan Corbet [Fri, 17 Oct 2025 20:07:08 +0000 (14:07 -0600)]
Merge branch 'media-uapi' into docs-mw
Mauro says:
In the past, media used Docbook to generate documentation, together
with some logic to ensure that cross-references would match the
actual defined uAPI.
The rationale is that we wanted to automatically check for uAPI
documentation gaps.
The same logic was migrated to Sphinx. Back then, broken links
were reported. However, recent versions of it and/or changes at
conf.py disabled such checks.
The result is that several symbols are now not cross-referenced,
and we don't get warnings anymore when something breaks.
This series consist on 2 parts:
Part 1: extra patches to parse_data_structs.py and kernel_include.py;
Part 2: media documentation fixes.
docs: cec: show broken xrefs and show TOC instead of cec.h content
Enable xref broken warnings. While here, change the output to
only show cross-references, as there's no need to show the entire cec.h
header at the docs.
docs: media: add missing c namespace to V4L headers
Media references belong to V4L namespace. Fix a lot of broken
links when including videodev2.h and probably fixing several
other broken cross-references between different files inside
media docs.
docs: kernel_include.py: use get_close_matches() to propose alternatives
Improve the suggestions algorithm by using get_close_matches() if
no suggestions with the same name are found. As we're now building
a dict, when the name is identical, but on a different domain,
the search is O(1), making it a lot faster.
The get_close_matches is also fast, as there is just one loop,
instead of 3.
This can be useful to detect typos on references, with could
be the base of a futuere extension that will handle ref unmatches
for the entire build, allowing someone to find typos and fix them.
As difflib and get_close_matches are there since the early
Python 3.x days, we don't need to handle any extra dependencies
to use it.
We're keeping the default values for the search, e.g. n=3, cutoff=0.6.
With that, we now have things like:
At the first example, it was not a typo, but a symbol that doesn't
seem to be properly documented. The second example points to
v4l2-queryctrl, which is a close match for the symbol.
docs: media: mediactl: use TOC instead of file contents
All we wanted were to have a way to link the comprehensive
documentation with the actual symbols parsed from the header
file, as this helps to identify any broken references.
Use the new :toc: flag for media controller and enable warnings.
Here, we need to adjust the exceptions file to setup the C
namespace accordingly.
docs: media: rc: use TOC instead of file contents for LIRC header
All we wanted were to have a way to link the comprehensive
documentation with the actual symbols parsed from the header
file, as this helps to identify any broken references.
Use the new :toc: flag for LIRC and enable warnings.
docs: media: dvb: enable warnings for most headers
Except for two exception rules and dmx.h, the other files
are already handling properly cross references.
Fix the two exception rules for frontend.h, as those are
false-positives:
include/uapi/linux/dvb/frontend.h:959: WARNING: can't link to: c:type:: FE_GET_PROPERTY
include/uapi/linux/dvb/frontend.h:933: WARNING: can't link to: c:func:: FE_SET_FRONTEND_TUNE_MODE
The dmx.h are actual issues that will require an extra
patch to fill gaps.
docs: media: dvb: use TOC instead of file contents at headers
All we wanted were to have a way to link the comprehensive
documentation with the actual symbols parsed from the header
file, as this helps to identify any broken references.