]> Gentwo Git Trees - linux/.git/log
linux/.git
8 days agodocs: makefile: move rustdoc check to the build wrapper
Mauro Carvalho Chehab [Fri, 21 Nov 2025 11:05:28 +0000 (12:05 +0100)]
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <c06b1834ef02099735c13ee1109fa2a2b9e47795.1763722971.git.mchehab+huawei@kernel.org>

8 days agoREADME: restructure with role-based documentation and guidelines
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.

Add quick start section and essential docs links.

Signed-off-by: Sasha Levin <sashal@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Kees Cook <kees@kernel.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251121180009.2634393-1-sashal@kernel.org>

8 days agodocs: kdoc: various fixes for grammar, spelling, punctuation
Randy Dunlap [Mon, 24 Nov 2025 04:10:11 +0000 (20:10 -0800)]
docs: kdoc: various fixes for grammar, spelling, punctuation

Correct grammar, spelling, and punctuation in comments, strings,
print messages, logs.

Change two instances of two spaces between words to just one space.

codespell was used to find misspelled words.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251124041011.3030571-1-rdunlap@infradead.org>

8 days agodocs: kdoc_parser: use '@' for Excess enum value
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>

8 days agodocs: submitting-patches: Clarify that removal of Acks needs explanation too
Krzysztof Kozlowski [Wed, 26 Nov 2025 08:19:06 +0000 (09:19 +0100)]
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>

8 days agodocs: kdoc_parser: add data/function attributes to ignore
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>

8 days agodocs: MAINTAINERS: update Mauro's files/paths
Randy Dunlap [Thu, 27 Nov 2025 06:31:25 +0000 (22:31 -0800)]
docs: MAINTAINERS: update Mauro's files/paths

Update Mauro's F: (files/paths) entry for docs scripts so that
get_maintainer.pl will report these correctly.

This is copied from Jon's entries for these paths.

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: <20251127063125.150441-1-rdunlap@infradead.org>

8 days agoMerge tag 'Chinese-docs-6.19' of gitolite.kernel.org:pub/scm/linux/kernel/git/alexs...
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

Above patches are tested by 'make htmldocs'

Signed-off-by: Alex Shi <alexs@kernel.org>
11 days agodocs/zh_CN: Add wd719x.rst translation
Yujie Zhang [Mon, 24 Nov 2025 06:28:40 +0000 (14:28 +0800)]
docs/zh_CN: Add wd719x.rst translation

Translate .../scsi/wd719x.rst into Chinese.
Add wd719x into .../scsi/index.rst.

Update the translation through commit 40ee63091a40
("scsi: docs: convert wd719x.txt to ReST")

Signed-off-by: Yujie Zhang <yjzhang@leap-io-kernel.com>
Signed-off-by: Alex Shi <alexs@kernel.org>
11 days agodocs/zh_CN: Add libsas.rst translation
Yujie Zhang [Mon, 24 Nov 2025 06:28:39 +0000 (14:28 +0800)]
docs/zh_CN: Add libsas.rst translation

Translate .../scsi/libsas.rst into Chinese.
Add libsas into .../scsi/index.rst.

Update the translation through commit 25882c82f850
("scsi: libsas: Delete lldd_clear_aca callback")

Signed-off-by: Yujie Zhang <yjzhang@leap-io-kernel.com>
Signed-off-by: Alex Shi <alexs@kernel.org>
2 weeks agoMerge branch 'mauro' into docs-mw
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.

2 weeks agoget_feat.pl: remove it, as it got replaced by get_feat.py
Mauro Carvalho Chehab [Tue, 18 Nov 2025 19:09:28 +0000 (20:09 +0100)]
get_feat.pl: remove it, as it got replaced by get_feat.py

Now that this was rewritten in Python, we can remove the old
tool.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <1f53e0fa48616af189ce98b45a65cc0c245e7aaf.1763492868.git.mchehab+huawei@kernel.org>

2 weeks agoDocumentation/sphinx/kernel_feat.py: use class directly
Mauro Carvalho Chehab [Tue, 18 Nov 2025 19:09:27 +0000 (20:09 +0100)]
Documentation/sphinx/kernel_feat.py: use class directly

Now that get_feat is in Python, we don't need to use subprocess
to fork an executable file: we can use the feature classes
directly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <c59d2542d7cc914fd5f8c84df966e63adc924cdc.1763492868.git.mchehab+huawei@kernel.org>

2 weeks agotools/docs/get_feat.py: convert get_feat.pl to Python
Mauro Carvalho Chehab [Tue, 18 Nov 2025 19:09:26 +0000 (20:09 +0100)]
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <03c26cee1ec567804735a33047e625ef5ab7bfa8.1763492868.git.mchehab+huawei@kernel.org>

2 weeks agoDocumentation/admin-guide: fix typo and comment in cscope example
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>

2 weeks agodocs/zh_CN: Add data-integrity.rst translation
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>
2 weeks agodocs/zh_CN: Add blk-mq.rst translation
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>
2 weeks agodocs/zh_CN: Add block/index.rst translation
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>
2 weeks agodocs/zh_CN: Update the Chinese translation of kbuild.rst
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>
2 weeks agoMerge branch 'python-modules' into docs-mw
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.

2 weeks agodocs: bring some order to our Python module hierarchy
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>

2 weeks agodocs: Move the python libraries to tools/lib/python
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>

2 weeks agoDocumentation/kernel-parameters: Move the kernel build options
Borislav Petkov (AMD) [Wed, 12 Nov 2025 11:46:41 +0000 (12:46 +0100)]
Documentation/kernel-parameters: Move the kernel build options

Move the kernel build options abbreviations to the .txt file so that
they are together instead of one having to go hunt them in the .rst
file.

Tweak the formatting so that the inclusion of kernel-parameters.txt
still keeps the whole thing somewhat presentable in the html output too.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251112114641.8230-1-bp@kernel.org>

2 weeks agodocs: parse-headers.rst: Fix a typo
Ankit Khushwaha [Sat, 15 Nov 2025 11:42:33 +0000 (17:12 +0530)]
docs: parse-headers.rst: Fix a typo

Replace "vantage" with "advantage" in the description of userspace API
cross-references.

Signed-off-by: Ankit Khushwaha <ankitkhushwaha.linux@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251115114233.32239-1-ankitkhushwaha.linux@gmail.com>

2 weeks agoDocumentation/kernel-parameters: fix typo in retbleed= kernel parameter description
Xie Yuanbin [Sun, 16 Nov 2025 14:53:02 +0000 (22:53 +0800)]
Documentation/kernel-parameters: fix typo in retbleed= kernel parameter description

Fixes a typo in the retbleed= parameter description, changing
"migitation" to "mitigation".

Fixes: 7fbf47c7ce50 ("x86/bugs: Add AMD retbleed= boot parameter")
Signed-off-by: Xie Yuanbin <qq570070308@gmail.com>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251116145302.3681-1-qq570070308@gmail.com>

2 weeks agodocs: zh_CN: scsi: fix broken references in scsi-parameters.rst
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>
3 weeks agodocs: parse-headers.rst: remove uneeded parenthesis
Mauro Carvalho Chehab [Tue, 11 Nov 2025 16:25:11 +0000 (17:25 +0100)]
docs: parse-headers.rst: remove uneeded parenthesis

As pointed by Randy, the parenthesis there is not needed and it
violates the document coding style.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/linux-doc/9d709020-03fe-467c-be7f-d5ee251bb79a@infradead.org/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <e5de9f7b1f6a963b2912574a65495c47cfbb13ba.1762878176.git.mchehab+huawei@kernel.org>

3 weeks agodocs: Makefile: update SPHINXDIRS documentation
Mauro Carvalho Chehab [Thu, 13 Nov 2025 11:00:32 +0000 (12:00 +0100)]
docs: Makefile: update SPHINXDIRS documentation

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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <683469813350214da122c258063dd71803ff700b.1763031632.git.mchehab+huawei@kernel.org>

3 weeks agoscripts: docs: kdoc_files.py: don't consider symlinks as directories
Mauro Carvalho Chehab [Thu, 13 Nov 2025 09:53:43 +0000 (10:53 +0100)]
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>

3 weeks agoDocumentation: tps6594-pfsm: Fix macro cross-reference syntax
Bagas Sanjaya [Tue, 4 Nov 2025 04:18:12 +0000 (11:18 +0700)]
Documentation: tps6594-pfsm: Fix macro cross-reference syntax

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>

3 weeks agoDocumentation: mrvl-cn10k-dpi: Fix macro cross-reference syntax
Bagas Sanjaya [Tue, 4 Nov 2025 04:18:11 +0000 (11:18 +0700)]
Documentation: mrvl-cn10k-dpi: Fix macro cross-reference syntax

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>

3 weeks agoDocumentation: amd-sbi: Wrap miscdevice listing snippet in literal code block
Bagas Sanjaya [Tue, 4 Nov 2025 04:18:10 +0000 (11:18 +0700)]
Documentation: amd-sbi: Wrap miscdevice listing snippet in literal code block

Device file listing (ls output) is shown as long-running paragraph
instead. Wrap it in literal code block.

Fixes: 4d95514d14e874 ("misc: amd-sbi: Add document for AMD SB IOCTL description")
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-2-bagasdotme@gmail.com>

3 weeks agoDocumentation: taskstats: Reindent payload kinds list
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>

3 weeks agoxfs-doc: Fix typo error
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>

3 weeks agoDocumentation: parport-lowlevel: Separate function listing code blocks
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>

3 weeks agotools/docs/get_abi.py: fix get_abi library directory
Mauro Carvalho Chehab [Fri, 7 Nov 2025 13:54:49 +0000 (14:54 +0100)]
tools/docs/get_abi.py: fix get_abi library directory

changeset a5dd93016f20 ("docs: move get_abi.py to tools/docs") moved
the script location, but didn't update library location, causing it
to fail.

Fixes: a5dd93016f20 ("docs: move get_abi.py to tools/docs")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <3839bc4db2d5c7e14dd2686876a2c7b5d72a46cd.1762523688.git.mchehab+huawei@kernel.org>

3 weeks agodocs: doc-guide: parse-headers.rst update its documentation
Mauro Carvalho Chehab [Sat, 8 Nov 2025 09:37:04 +0000 (10:37 +0100)]
docs: doc-guide: parse-headers.rst update its documentation

Besides converting from Perl to Python, parse-headers has gained
some new functionality and was moved to tools/docs.

Update its documentation accordingly.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/linux-doc/9391a0f0-7c92-42aa-8190-28255b22e131@infradead.org/
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <1f9025dc98dc58da3cc31f3343d5027f351be338.1762594622.git.mchehab+huawei@kernel.org>

3 weeks agodocs: Fix missing word in spectre.rst
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>

4 weeks agodocs: ABI: sysfs-module: update modules taint flags
Randy Dunlap [Sun, 2 Nov 2025 06:04:57 +0000 (23:04 -0700)]
docs: ABI: sysfs-module: update modules taint flags

Add missing taint flags for loadable modules, as pointed out by
Petr Pavlu [1].

[1] https://lore.kernel.org/all/c58152f1-0fbe-4f50-bb61-e2f4c0584025@suse.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>

4 weeks agoDocumentation: uacce: Add explicit title
Bagas Sanjaya [Mon, 3 Nov 2025 09:38:18 +0000 (16:38 +0700)]
Documentation: uacce: Add explicit title

Uacce docs' sections are listed in misc-devices toctree instead due to
lack of explicit docs title. Add it to clean up the toctree.

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: <20251103093817.52764-2-bagasdotme@gmail.com>

4 weeks agoDocumentation: pldmfw: Demote library overview section
Bagas Sanjaya [Mon, 3 Nov 2025 03:02:28 +0000 (10:02 +0700)]
Documentation: pldmfw: Demote library overview section

pldmfw library overview section is formatted as title heading (the
second title of index.rst), making it listed in driver-api toctree.

Demote the section.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251103030228.23851-1-bagasdotme@gmail.com>

4 weeks agodoc-guide: kernel-doc: add %CONST examples
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>

4 weeks agodocs: Makefile: Sort Documentation targets case-insensitively in make help
Bhanu Seshu Kumar Valluri [Tue, 4 Nov 2025 06:17:23 +0000 (11:47 +0530)]
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>

4 weeks agodocs: w1: fix w1-netlink invalid URL
Randy Dunlap [Tue, 4 Nov 2025 19:44:03 +0000 (11:44 -0800)]
docs: w1: fix w1-netlink invalid URL

The URL in w1-netlink.rst for an example userspace application
has changed. The former URL is no longer valid. Update it to the
github URL.

Fixes: e4e056aa3518 ("w1: documentation update")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251104194403.945611-1-rdunlap@infradead.org>

4 weeks agoDocumentation/rtla: Include defaults for tracer options
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>

4 weeks agoDocumentation/trace: Specify exact priority for timerlat
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>

4 weeks agoDocumentation/rtla: Mention default cgroup state
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>

4 weeks agoDocumentation/rtla: Mention default priority
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>

4 weeks agoDocumentation/rtla: Correct tracer name for common options
Tomas Glozar [Fri, 10 Oct 2025 08:33:34 +0000 (10:33 +0200)]
Documentation/rtla: Correct tracer name for common options

Several options in common_options.rst say "osnoise tracer" for both
osnoise and timerlat.

Use |tool| variable so that the correct tool name is used.

Fixes: b1be48307de4 ("rtla: Add rtla osnoise top documentation")
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-6-tglozar@redhat.com>

4 weeks agoDocumentation/rtla: Fix typo in common_timerlat_options.txt
Tomas Glozar [Fri, 10 Oct 2025 08:33:33 +0000 (10:33 +0200)]
Documentation/rtla: Fix typo in common_timerlat_options.txt

Fix spelling error "equilavent" in place of "equivalent".

Fixes: 173a3b014827 ("rtla/timerlat: Add the automatic trace option")
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-5-tglozar@redhat.com>

4 weeks agoDocumentation/rtla: Fix typo in rtla-timerlat-top.rst
Tomas Glozar [Fri, 10 Oct 2025 08:33:32 +0000 (10:33 +0200)]
Documentation/rtla: Fix typo in rtla-timerlat-top.rst

Fix "seem" in place of intended "seen" in rtla-timerlat-top
documentation.

Fixes: df337d014b57 ("rtla: Add rtla timerlat top documentation")
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-4-tglozar@redhat.com>

4 weeks agoDocumentation/rtla: Fix typo in common_timerlat_options.txt
Tomas Glozar [Fri, 10 Oct 2025 08:33:31 +0000 (10:33 +0200)]
Documentation/rtla: Fix typo in common_timerlat_options.txt

Fix "awakes" being used in place of "awakened" in --users-threads option
documentation.

Fixes: 612738321774 ("Documentation: Add tools/rtla timerlat -u option documentation")
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-3-tglozar@redhat.com>

4 weeks agoDocumentation/rtla: Fix typo in common_options.txt
Tomas Glozar [Fri, 10 Oct 2025 08:33:30 +0000 (10:33 +0200)]
Documentation/rtla: Fix typo in common_options.txt

Fix "unlike" being spelled "nlike" in --on-threshold documentation.

Fixes: 70165c78e31d ("Documentation/rtla: Add actions feature")
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-2-tglozar@redhat.com>

4 weeks agokernel-doc: Issue warnings that were silently discarded
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>

4 weeks agoMAINTAINERS: extend DOCUMENTATION SCRIPTS to the full directories
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>

4 weeks agoMerge branch 'tools-final2' into docs-mw
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.

4 weeks agoDocumentation: treewide: Replace marc.info links with lore
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].

[1]: https://marc.info/?l=linux-arm-kernel&m=110061245502000&w=2
[2]: https://lore.kernel.org/linux-arm-kernel/?q=b%3A%22Re%3A+Memory+mapping+on+Cirrus+EP9315%22

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Acked-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251031043358.23709-1-bagasdotme@gmail.com>

4 weeks agoMerge tag 'Chinese-docs-6.18' of gitolite.kernel.org:pub/scm/linux/kernel/git/alexs...
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

Above patches are tested by 'make htmldocs'

4 weeks agocoding-style: fix verb typo
Gabriele Ricciardi [Sat, 1 Nov 2025 22:31:19 +0000 (22:31 +0000)]
coding-style: fix verb typo

In the Identation section there is a list of instructions in
second-person. The offending line uses third-person singular.

Signed-off-by: Gabriele Ricciardi <gricciardi-coding@pm.me>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251101223027.171874-1-gricciardi-coding@pm.me>

5 weeks agoRevert "Docs/zh_CN: Translate skbuff.rst to Simplified Chinese"
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.

Signed-off-by: Alex Shi <alexs@kernel.org>
5 weeks agodocs: kdoc: fix duplicate section warning message
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>

5 weeks agoDocumentation: fix reference to PR_SPEC_L1D_FLUSH
Brendan Jackman [Wed, 15 Oct 2025 17:02:06 +0000 (17:02 +0000)]
Documentation: fix reference to PR_SPEC_L1D_FLUSH

PR_SET_L1D_FLUSH does not exist.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251015-l1d-flush-doc-v1-2-f8cefea3f2f2@google.com>

5 weeks agoDocumentation: clarify PR_SPEC_L1D_FLUSH
Brendan Jackman [Wed, 15 Oct 2025 17:02:05 +0000 (17:02 +0000)]
Documentation: clarify PR_SPEC_L1D_FLUSH

For PR_SPEC_STORE_BYPASS and PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE
means "disable the speculation bug" i.e. "enable the mitigation".

For PR_SPEC_L1D_FLUSH, PR_SPEC_DISABLE means "disable the mitigation".
This is not obvious, so document it.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20251015-l1d-flush-doc-v1-1-f8cefea3f2f2@google.com>

5 weeks agoDocumentation: process: Also mention Sasha Levin as stable tree maintainer
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>

5 weeks agodocs: replace broken links in ramfs-rootfs-initramfs docs
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>

5 weeks agotools/docs/sphinx-build-wrapper: Emit $SPHINXOPTS later in args list
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.

Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Closes: https://lore.kernel.org/20251007-awesome-guan-of-greatness-e6ec75@lemur/
Reported-by: Akira Yokosawa <akiyks@gmail.com>
Closes: https://lore.kernel.org/c35e690f-0579-49cb-850c-07af98e5253a@gmail.com/
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <eaf4bfd8-fb80-45d0-b3ec-4047692ebbed@gmail.com>

5 weeks agodocs: remove kernel-doc.pl
Jonathan Corbet [Wed, 13 Aug 2025 19:08:22 +0000 (13:08 -0600)]
docs: remove kernel-doc.pl

We've been using the Python version and nobody has missed this one.  All
credit goes to Mauro Carvalho Chehab for creating the replacement.

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>
5 weeks agodocs: move find-unused-docs.sh to tools/docs
Jonathan Corbet [Wed, 13 Aug 2025 19:03:08 +0000 (13:03 -0600)]
docs: move find-unused-docs.sh to tools/docs

...and update references accordingly.

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>
5 weeks agodocs: move test_doc_build.py to tools/docs
Jonathan Corbet [Wed, 13 Aug 2025 18:21:50 +0000 (12:21 -0600)]
docs: move test_doc_build.py to tools/docs

Add this tool to tools/docs.

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>
5 weeks agodocs: move get_abi.py to tools/docs
Jonathan Corbet [Wed, 13 Aug 2025 17:33:09 +0000 (11:33 -0600)]
docs: move get_abi.py to tools/docs

Move this tool out of scripts/ to join the other documentation tools; fix
up a couple of erroneous references in the process.

It's worth noting that this script will fail badly unless one has a
PYTHONPATH referencing scripts/lib/abi.

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>
5 weeks agodocs: move scripts/documentation-file-ref-check to tools/docs
Jonathan Corbet [Wed, 13 Aug 2025 17:16:28 +0000 (11:16 -0600)]
docs: move scripts/documentation-file-ref-check to tools/docs

Add this script to the growing collection of documentation tools.

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>
5 weeks agodocs: move checktransupdate.py to tools/docs
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>
5 weeks agodocs: Move the "features" tools to tools/docs
Jonathan Corbet [Wed, 13 Aug 2025 16:50:20 +0000 (10:50 -0600)]
docs: Move the "features" tools to tools/docs

The scripts for managing the features docs are found in three different
directories; unite them all under tools/docs and update references as
needed.

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>
6 weeks agodocs: checkpatch: Drop networking comment style
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>

6 weeks agodocs: checkpatch: Align block comment style
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>

6 weeks agoDocumentation: fix dev-tools broken links in translations
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>

7 weeks agodocs/zh_CN: Add translation of rust/testing.rst
Ben Guo [Mon, 13 Oct 2025 23:44:01 +0000 (23:44 +0000)]
docs/zh_CN: Add translation of rust/testing.rst

Complete the translation of rust/testing.rst and add the testing TOC entry
to rust/index.rst.

Add the translation based on commit a3b2347343e0
("Documentation: rust: testing: add docs on the new KUnit `#[test]` tests").

Signed-off-by: Ben Guo <benx.guo@gmail.com>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cm>
Signed-off-by: Alex Shi <alexs@kernel.org>
7 weeks agodocs/zh_CN: Add secrets coco Chinese translation
Shuo Zhao [Mon, 13 Oct 2025 03:19:27 +0000 (11:19 +0800)]
docs/zh_CN: Add secrets coco Chinese translation

Translate .../security/secrets/coco.rst into Chinese.

Update the translation through commit d56b699d76d1
("Documentation: Fix typos").

Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Alex Shi <alexs@kernel.org>
7 weeks agoDocumentation/rtla: rename common_xxx.rst files to common_xxx.txt
Gopi Krishna Menon [Mon, 13 Oct 2025 09:27:20 +0000 (16:27 +0700)]
Documentation/rtla: rename common_xxx.rst files to common_xxx.txt

Sphinx reports htmldocs errors:

Documentation/tools/rtla/common_options.rst:58: ERROR: Undefined substitution referenced: "threshold".
Documentation/tools/rtla/common_options.rst:88: ERROR: Undefined substitution referenced: "tool".
Documentation/tools/rtla/common_options.rst:88: ERROR: Undefined substitution referenced: "thresharg".
Documentation/tools/rtla/common_options.rst:88: ERROR: Undefined substitution referenced: "tracer".
Documentation/tools/rtla/common_options.rst:92: ERROR: Undefined substitution referenced: "tracer".
Documentation/tools/rtla/common_options.rst:98: ERROR: Undefined substitution referenced: "actionsperf".
Documentation/tools/rtla/common_options.rst:113: ERROR: Undefined substitution referenced: "tool".

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>

7 weeks agoDocumentation: assoc_array: Format internal tree layout tables
Bagas Sanjaya [Mon, 13 Oct 2025 09:56:31 +0000 (16:56 +0700)]
Documentation: assoc_array: Format internal tree layout tables

Format tables in "Basic internal tree layout" as reST tables.

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-4-bagasdotme@gmail.com>

7 weeks agoDocumentation: assoc_array: Indent function explanation text
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>

7 weeks agodocs: admin-guide: Fix a typo in kernel-parameters.txt
Yohei Kojima [Wed, 15 Oct 2025 03:31:03 +0000 (12:31 +0900)]
docs: admin-guide: Fix a typo in kernel-parameters.txt

Fix a typo in the stacktrace parameter description in kernel-parameters.txt

Signed-off-by: Yohei Kojima <Yohei.Kojima@sony.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <edda15e3fcae13265278d3c3bd93ab077345d78f.1760498951.git.Yohei.Kojima@sony.com>

7 weeks agoMerge branch 'build-script' into docs-mw
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:

    $ ./tools/docs/sphinx-build-wrapper --help
    usage: sphinx-build-wrapper [-h]
   [--sphinxdirs SPHINXDIRS [SPHINXDIRS ...]] [--conf CONF]
   [--builddir BUILDDIR] [--theme THEME] [--css CSS] [--paper {,a4,letter}] [-v]
   [-j JOBS] [-i] [-V [VENV]]
   {cleandocs,linkcheckdocs,htmldocs,epubdocs,texinfodocs,infodocs,mandocs,latexdocs,pdfdocs,xmldocs}

    Kernel documentation builder

    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.

7 weeks agoMerge branch 'media-uapi' into docs-mw
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.

7 weeks agodocs: media: dvb: fix dmx.h.rst.exceptions
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:46 +0000 (16:49 +0200)]
docs: media: dvb: fix dmx.h.rst.exceptions

There are lots of broken links on dmx. Those are mostly linked
to namespace handling.

Yet, some symbols were pointed to the wrong locations, and there
are some definitions that aren't needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <b2acf243771529daa925afddd2b68d07d7bbb164.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: dvb: headers: warn about broken cross references
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:45 +0000 (16:49 +0200)]
docs: media: dvb: headers: warn about broken cross references

Enable cross-reference warnings for demux header.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <8f98dde399df8b937dadf09168194bacce682c7d.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: dmx_types: place kerneldoc at the right namespace
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:44 +0000 (16:49 +0200)]
docs: media: dmx_types: place kerneldoc at the right namespace

The DVB documentation is using DTV.dmx for all demux symbols.

Use such domain for kernel-doc documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <27fcc036fb5c80bda8116029e1964ad229208095.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: cec: show broken xrefs and show TOC instead of cec.h content
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:43 +0000 (16:49 +0200)]
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <c587872ca3685213d9f8e88277404c9e253633df.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: cec: cec.h.rst.exceptions: fix broken references from cec.h
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:42 +0000 (16:49 +0200)]
docs: cec: cec.h.rst.exceptions: fix broken references from cec.h

All references there belong to CEC namespace.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <dd1270dd5d91538cdfb0b087127c53a9f4ba7885.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agomedia: docs: add some C domain missing references
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:41 +0000 (16:49 +0200)]
media: docs: add some C domain missing references

Some enum/struct fields don't contain C domain references.
Add them to avoid broken xrefs.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <c9b036938197f1dd5bc93f5c5be0245bd9e5d1ee.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agomedia: docs: videodev2.h.rst.exceptions: ignore struct __kernel_v4l2_timeval
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:40 +0000 (16:49 +0200)]
media: docs: videodev2.h.rst.exceptions: ignore struct __kernel_v4l2_timeval

This is an ancillary struct used for year-2038 compat logic.
It is not meant to be used directly on userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <a6a0dc7366b1a5d7184b8f7d4ba27689051a1f6a.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agomedia: docs: add a missing reference for VIDIOC_QUERY_CTRL
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:39 +0000 (16:49 +0200)]
media: docs: add a missing reference for VIDIOC_QUERY_CTRL

This one is missing its c:macro definition.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <46f86be6ace28abe83ea9ce6fa6138e40185a23a.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: videodev2.h.rst.exceptions: fix namespace on refs
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:38 +0000 (16:49 +0200)]
docs: media: videodev2.h.rst.exceptions: fix namespace on refs

Media uses V4L domain, but the replace rules are not considering
it.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <927f9c19d90b62ffda950cdac9bba23c2ca09f53.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: add missing c namespace to V4L headers
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:37 +0000 (16:49 +0200)]
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <b69fc5bd43da7d326b9f4720df59388088c64065.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: kernel_include.py: use get_close_matches() to propose alternatives
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:36 +0000 (16:49 +0200)]
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:

  $ make SPHINXDIRS="userspace-api/media" htmldocs
  ...
  include/uapi/linux/videodev2.h:199: WARNING: Invalid xref: c:type:`v4l2_memory`. Possible alternatives:
        c:type:`v4l2_meta_format` (from v4l/dev-meta)
        c:type:`v4l2_rect` (from v4l/dev-overlay)
        c:type:`v4l2_area` (from v4l/ext-ctrls-image-source) [ref.missing]
  ...
  include/uapi/linux/videodev2.h:1985: WARNING: Invalid xref: c:type:`V4L.v4l2_queryctrl`. Possible alternatives:
        std:label:`v4l2-queryctrl` (from v4l/vidioc-queryctrl)
        std:label:`v4l2-query-ext-ctrl` (from v4l/vidioc-queryctrl)

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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <7365feb74cbdd6b982c87baf5863360ab98cf727.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: mediactl: use TOC instead of file contents
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:35 +0000 (16:49 +0200)]
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <5c8a87be712397563fc8ca914c3d92fe675e4071.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: rc: use TOC instead of file contents for LIRC header
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:34 +0000 (16:49 +0200)]
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <94dc601b4777ca544489ffc6cef9a2da5fe28e0e.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: dvb: enable warnings for most headers
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:33 +0000 (16:49 +0200)]
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <9ae6556ebd47de4f066a149ab0bbe7ce27acf2c4.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agodocs: media: dvb: use TOC instead of file contents at headers
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:32 +0000 (16:49 +0200)]
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.

Use the new :toc: flag for DVB.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <dbe95d83ae2117ed532fda423fd1c1d9906b7a19.1759329363.git.mchehab+huawei@kernel.org>

7 weeks agotools: docs: parse_data_structs.py: accept more reftypes
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:31 +0000 (16:49 +0200)]
tools: docs: parse_data_structs.py: accept more reftypes

Current regex is limited to only some c-domain reftypes.
There are several others.

Change the code to pick the name specified there.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <5c146923d1e3183893f290216fb1378954e2e540.1759329363.git.mchehab+huawei@kernel.org>