]> git.ipfire.org Git - thirdparty/kernel/stable.git/log
thirdparty/kernel/stable.git
3 weeks agodocs: Pull LKMM documentation into dev-tools book
Akira Yokosawa [Thu, 11 Sep 2025 08:29:31 +0000 (17:29 +0900)] 
docs: Pull LKMM documentation into dev-tools book

Currently, LKMM docs are not included in any of kernel documentation
books.

Commit e40573a43d16 ("docs: put atomic*.txt and memory-barriers.txt
into the core-api book") covered plain-text docs under Documentation/
by using the "include::" directive along with the ":literal:" option.

As LKMM docs are not under Documentation/, the same approach would not
work due to the directive's restriction.

As a matter of fact, kernel documentation has an extended directive
by the name of "kernel-include::", which loosens such restriction and
accepts any files under the kernel source tree.

Rather than moving LKMM docs around, use the latter and pull them into
the dev-tools book next to KCSAN.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <7ce84a93-5cbc-420e-894a-06a0372c52ab@gmail.com>

3 weeks agodocs: w1: ds2482: fix typo in buses
Akiyoshi Kurita [Sat, 13 Sep 2025 17:34:13 +0000 (02:34 +0900)] 
docs: w1: ds2482: fix typo in buses

Correct a spelling mistake in ds2482.rst
("busses" -> "buses").

No functional change.

Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250913173413.951378-1-weibu@redadmin.org>

3 weeks agoDocumentation: staging: fix spelling error in remoteproc.rst
Taimoor Zaeem [Sun, 14 Sep 2025 11:31:56 +0000 (16:31 +0500)] 
Documentation: staging: fix spelling error in remoteproc.rst

Fix typo 'implementors' to 'implementers' in remote processor framework
documentation.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <CANQcFN1s_iM8p5tYNz3Q_WyZki6Aw9_3HyoKwyoCVA9JeqG0eA@mail.gmail.com>

3 weeks agodocs: kdoc: handle the obsolescensce of docutils.ErrorString()
Jonathan Corbet [Tue, 9 Sep 2025 19:35:37 +0000 (13:35 -0600)] 
docs: kdoc: handle the obsolescensce of docutils.ErrorString()

The ErrorString() and SafeString() docutils functions were helpers meant to
ease the handling of encodings during the Python 3 transition.  There is no
real need for them after Python 3.6, and docutils 0.22 removes them,
breaking the docs build

Handle this by just injecting our own one-liner version of ErrorString(),
and removing the sole SafeString() call entirely.

Reported-by: Zhixu Liu <zhixu.liu@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <87ldmnv2pi.fsf@trenco.lwn.net>

3 weeks agodocs: update the guidance for Link: tags
Jonathan Corbet [Mon, 8 Sep 2025 19:32:10 +0000 (13:32 -0600)] 
docs: update the guidance for Link: tags

As stated definitively by Linus, the use of Link: tags should be limited to
situations where there is additional useful information to be found at the
far end of the link.  Update our documentation to reflect that policy, and
to remove the suggestion for a Git hook to add those tags automatically.

Link: https://lore.kernel.org/all/CAHk-=wh5AyuvEhNY9a57v-vwyr7EkPVRUKMPwj92yF_K0dJHVg@mail.gmail.com/
Cc: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <87segwyc3p.fsf@trenco.lwn.net>

4 weeks agoDocumentation: update maintainer-pgp-guide for latest best practices
Konstantin Ryabitsev [Tue, 2 Sep 2025 15:44:19 +0000 (11:44 -0400)] 
Documentation: update maintainer-pgp-guide for latest best practices

Freshen up the maintainer PGP guide:

- Bump minimum GnuPG version requirement from 2.2 to 2.4, since 2.2 is
  no longer maintained
- All major hardware tokens now support Curve25519, so remove outdated
  ECC support callouts
- Update hardware device recommendations (Nitrokey Pro 2 -> Nitrokey 3)
- Broaden backup media terminology (USB thumb drive -> external media)
- Update wording to follow vale's linter recommendations
- Various minor wording improvements for clarity

Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Reviewed-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250902-pgp-guide-updates-v1-1-62ac7312d3f9@linuxfoundation.org>

4 weeks agodocs: submitting-patches: adjust Fixes definition slightly
Jakub Kicinski [Thu, 4 Sep 2025 14:45:33 +0000 (07:45 -0700)] 
docs: submitting-patches: adjust Fixes definition slightly

Every now and then people send stylistic patches and use Fixes
purely to refer to a commit which added the ugly or unnecessary
code. Reword the docs about Fixes.

It should hopefully be enough to lead with the word "bug"
rather than "issue". We can add more verbiage later, tho, let's
try the word swap first. I always feel like the more words the
smaller the chance someone will actually read the docs.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250904144533.2146576-1-kuba@kernel.org>

4 weeks agoMerge branch 'renames' into docs-mw
Jonathan Corbet [Tue, 9 Sep 2025 19:40:35 +0000 (13:40 -0600)] 
Merge branch 'renames' into docs-mw

From Vegard Nossum:

When we rename an .rst file, that also changes the URL for the document
at https://docs.kernel.org/ and results in a 404, which can be anonying
for people who bookmark URLs and/or follow links from search engines
and old changelogs and emails.

In order to be able to fearlessly rename individual documentation files
and reorganize Documentation/, add two scripts:

- tools/docs/gen-renames.py : use git to figure out which .rst files
  have been renamed

- tools/docs/gen-redirects.py : actually generate .html stubs for the
  locations, redirecting to the new locations

The reason for splitting this into two is that trawling git history is
slightly slow (on the order of 20-30 seconds on my laptop) whereas just
generating the HTML files is very fast. This also allows us to cache
the historical renames in Documentation/.renames.txt or add manual
fixups as needed.

4 weeks agodocs: add tools/docs/gen-redirects.py
Vegard Nossum [Fri, 5 Sep 2025 14:46:08 +0000 (16:46 +0200)] 
docs: add tools/docs/gen-redirects.py

Add a new script and a new documentation 'make' target,
htmldocs-redirects.

This will generate HTML stub files in the HTML documentation output
directory that redirect the browser to the new path.

Suggested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Suggested-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250905144608.577449-4-vegard.nossum@oracle.com>

4 weeks agodocs: add Documentation/.renames.txt
Vegard Nossum [Fri, 5 Sep 2025 14:46:07 +0000 (16:46 +0200)] 
docs: add Documentation/.renames.txt

This is the result of running:

  scripts/documentation-gen-renames.py --rev v6.17-rc3 > Documentation/.renames.txt

This file records renames in the Documentation/ directory so that we
can use it to quickly generate HTML redirects from removed paths.

Suggested-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250905144608.577449-3-vegard.nossum@oracle.com>

4 weeks agodocs: add tools/docs/gen-renames.py
Vegard Nossum [Fri, 5 Sep 2025 14:46:06 +0000 (16:46 +0200)] 
docs: add tools/docs/gen-renames.py

Add a new script that wraps git to trawl the repository history for
renames of .rst files in the Documentation/ directory.

Example usage:

  tools/docs/gen-renames.py --rev v6.17-rc3 > Documentation/.renames.txt

The output format is simply:

  <old path> SPACE <new path> NEWLINE

where neither <old path> nor <new path> contain the Documentation/
prefix or the .rst suffix. The file is sorted alphabetically.

We can suggest rerunning the script for future renames (and squash the
resulting change) or rerun it periodically to keep the file up to date.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250905144608.577449-2-vegard.nossum@oracle.com>

4 weeks agoDocumentation: w1: Fix SPDX comment syntax on masters and slaves toctree index
Bagas Sanjaya [Tue, 9 Sep 2025 02:21:42 +0000 (09:21 +0700)] 
Documentation: w1: Fix SPDX comment syntax on masters and slaves toctree index

Commit e9bb627561535d ("docs: w1: convert to ReST and add to the kAPI
group of docs") converts 1-Wire docs to reST alongside with SPDX
comment, yet the comment is written in one dot as opposed to two in
order to be recognized as comment directive, which spills it into
htmldocs output. This issue is partially fixed in d8fb03e1ea64e7 ("docs:
w1: Fix SPDX-License-Identifier syntax") as it only touches top-level w1
toctree.

Do the same fix on masters and slaves toctrees.

Fixes: e9bb62756153 ("docs: w1: convert to ReST and add to the kAPI group of docs")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20250909022142.18007-1-bagasdotme@gmail.com>

5 weeks agodoc: filesystems: proc: remove stale information from intro
Baruch Siach [Wed, 27 Aug 2025 11:37:27 +0000 (14:37 +0300)] 
doc: filesystems: proc: remove stale information from intro

Most of the information in the first paragraph of the
Introduction/Credits section is outdated.

Documentation update suggestions should go to documentation maintainers
listed in MAINTAINERS. Remove misleading contact information.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/cb4987a16ed96ee86841aec921d914bd44249d0b.1756294647.git.baruch@tkos.co.il
5 weeks agodocs: admin-guide: Fix typo in nfsroot.rst
Zenghui Yu [Wed, 27 Aug 2025 14:47:38 +0000 (22:47 +0800)] 
docs: admin-guide: Fix typo in nfsroot.rst

There is an obvious mistake in nfsroot.rst where pxelinux was wrongly
written as pxeliunx. Fix it.

Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250827144738.43361-1-zenghui.yu@linux.dev
5 weeks agodocs: sphinx: remove SPDX/copyright comments from HTML output
Vegard Nossum [Sat, 30 Aug 2025 17:08:08 +0000 (19:08 +0200)] 
docs: sphinx: remove SPDX/copyright comments from HTML output

Use Jinja2 comments instead of HTML comments for the SPDX and copyright
lines. This prevents them from appearing in the HTML output, which was
never the intention; the HTML output has its own copyright line at the
bottom of the document.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250830170808.3911151-1-vegard.nossum@oracle.com
5 weeks agoDocumentation: dev-tools: Fix a typo in autofdo documentation
Harshit Mogalapalli [Sun, 31 Aug 2025 15:11:18 +0000 (08:11 -0700)] 
Documentation: dev-tools: Fix a typo in autofdo documentation

Use "cat /proc/cpuinfo" instead of "cat proc/cpuinfo".

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250831151118.1274826-1-harshit.m.mogalapalli@oracle.com
5 weeks agoDocumentation: Fix spelling mistakes
Ranganath V N [Tue, 2 Sep 2025 19:38:22 +0000 (01:08 +0530)] 
Documentation: Fix spelling mistakes

Corrected a few spelling mistakes to improve the readability.

Signed-off-by: Ranganath V N <vnranganath.20@gmail.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250902193822.6349-1-vnranganath.20@gmail.com
5 weeks agotracing: fix grammar error in debugging.rst
Ryan Chung [Sun, 31 Aug 2025 10:17:29 +0000 (19:17 +0900)] 
tracing: fix grammar error in debugging.rst

Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250831101736.11519-3-seokwoo.chung130@gmail.com
5 weeks agotracing: rephrase for clearer documentation
Ryan Chung [Sun, 31 Aug 2025 10:17:28 +0000 (19:17 +0900)] 
tracing: rephrase for clearer documentation

Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250831101736.11519-2-seokwoo.chung130@gmail.com
5 weeks agodocs: kernel_include.py: drop some old behavior
Mauro Carvalho Chehab [Mon, 1 Sep 2025 13:21:22 +0000 (15:21 +0200)] 
docs: kernel_include.py: drop some old behavior

The old behavior is not using anymore, so let's drop it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/00cdf3cbe2481aac875c543ded14b5eacfe071ec.1756732363.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: fix an issue when O= is used
Mauro Carvalho Chehab [Mon, 1 Sep 2025 13:21:21 +0000 (15:21 +0200)] 
docs: kernel_include.py: fix an issue when O= is used

As reported by Stephen, building docs with O= is now
broken. Fix it by ensuring that it will seek files under
Kernel source tree.

The original logic was defined to accept including files
under Documentation/output. The new logic doesn't need it
anymore for media, but it might still be useful to preserve
the previous behavior. So, I ended preserving it.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20250901142639.4de35a11@canb.auug.org.au/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/da91980ce42f31730dc982920167b2757b9d2769.1756732363.git.mchehab+huawei@kernel.org
5 weeks agodocs: conf.py: drop xindy rule
Mauro Carvalho Chehab [Mon, 25 Aug 2025 12:04:55 +0000 (14:04 +0200)] 
docs: conf.py: drop xindy rule

The rule as-is is wrong, as it was inverted. Besides that, after
retest building all repos with suggested LaTeX packages given
by sphinx-pre-install, I was unable to reproduce the issues
I saw with xindy in the past.

So, let's just drop. If anyone reports issues with xindy, we
may need to readd, but at the right way, e.g. {options}{pkgname}.

Reported-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/83068bc31839e7095f1f408e49658362d467797e.1756123459.git.mchehab+huawei@kernel.org
5 weeks agoDocumentation: sharedsubtree: Convert notes to note directive
Bagas Sanjaya [Tue, 19 Aug 2025 06:12:53 +0000 (13:12 +0700)] 
Documentation: sharedsubtree: Convert notes to note directive

While a few of the notes are already in reST syntax, others are left
intact (inconsistent). Convert them to reST syntax too.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819061254.31220-6-bagasdotme@gmail.com
5 weeks agoDocumentation: sharedsubtree: Align text
Bagas Sanjaya [Tue, 19 Aug 2025 06:12:52 +0000 (13:12 +0700)] 
Documentation: sharedsubtree: Align text

The docs make heavy use of lists. As it is currently written, these
generate a lot of unnecessary hanging indents since these are not
semantically meant to be definition lists by accident.

Align text to trim these indents.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819061254.31220-5-bagasdotme@gmail.com
5 weeks agoDocumentation: sharedsubtree: Don't repeat lists with explanation
Bagas Sanjaya [Tue, 19 Aug 2025 06:12:51 +0000 (13:12 +0700)] 
Documentation: sharedsubtree: Don't repeat lists with explanation

Don't repeat lists only mentioning the items when a corresponding list
with item's explanations suffices.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819061254.31220-4-bagasdotme@gmail.com
5 weeks agoDocumentation: sharedsubtree: Use proper enumerator sequence for enumerated lists
Bagas Sanjaya [Tue, 19 Aug 2025 06:12:50 +0000 (13:12 +0700)] 
Documentation: sharedsubtree: Use proper enumerator sequence for enumerated lists

Sphinx does not recognize mixed-letter sequences (e.g. 2a) as enumerator
for enumerated lists. As such, lists that use such sequences end up as
definition lists instead.

Use proper enumeration sequences for this purpose.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819061254.31220-3-bagasdotme@gmail.com
5 weeks agoDocumentation: sharedsubtree: Format remaining of shell snippets as literal code...
Bagas Sanjaya [Tue, 19 Aug 2025 06:12:49 +0000 (13:12 +0700)] 
Documentation: sharedsubtree: Format remaining of shell snippets as literal code blcoks

Fix formatting inconsistency of shell snippets by wrapping the remaining
of them in literal code blocks.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819061254.31220-2-bagasdotme@gmail.com
5 weeks agodocs: fix spelling and grammar in atomic_writes
Mallikarjun Thammanavar [Tue, 19 Aug 2025 12:46:04 +0000 (12:46 +0000)] 
docs: fix spelling and grammar in atomic_writes

Fix minor spelling and grammatical issues in the ext4 atomic_writes
documentation.

Signed-off-by: Mallikarjun Thammanavar <mallikarjunst09@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819124604.8995-1-mallikarjunst09@gmail.com
5 weeks agoFix typo in RAID arrays documentation
Vivek Alurkar [Thu, 21 Aug 2025 05:16:21 +0000 (22:16 -0700)] 
Fix typo in RAID arrays documentation

Changed "write-throuth" to "write-through".

Signed-off-by: Vivek Alurkar <primalkenja@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250821051622.8341-2-primalkenja@gmail.com
5 weeks agoDocumentation/filesystems/xfs: Fix typo error
Alperen Aksu [Thu, 21 Aug 2025 13:13:47 +0000 (13:13 +0000)] 
Documentation/filesystems/xfs: Fix typo error

Fixed typo error in referring to the section's headline
Fixed to correct spelling of "mapping"

Signed-off-by: Alperen Aksu <aksulperen@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250821131404.25461-1-aksulperen@gmail.com
5 weeks agoMerge branch 'mauro' into docs-mw
Jonathan Corbet [Fri, 29 Aug 2025 21:58:48 +0000 (15:58 -0600)] 
Merge branch 'mauro' into docs-mw

Another build series from Mauro:

The goal of this series is to drop one of the most ancient and ugliest
hack from the documentation build system. Before migrating to Sphinx,
the media subsystem already had a very comprehensive uAPI book, together
with a build time system to detect and point for any documentation gaps.

When migrating to Sphinx, we ported the logic to a Perl script
(parse-headers.pl) and Markus came up with a Sphinx extension
(kernel_include.py). We also added some files to control how parse-headers
produce results, and a Makefile.

At the initial Sphinx versions (1.4.1 if I recall correctly), when
a new symbol is added to videodev2.h, a new warning were
produced at documentatiion time, it the patchset didn't have
the corresponding documentation path.

While kernel-include is generic, the only user at the moment is the media
subsystem.

This series gets rid of the Python script, replacing it by a command
line script and a class. The parse header class can optionally be used by
kernel-include to produce an enriched code that will contain cross-references.

As the other conversions, it starts with a bug-compatible version of
parse-headers, but the subsequent patches add more functionalities and
fix bugs.

It should be noticed that modern of Sphinx disabled the cross-reference
warnings. So, at the next series, I'll be re-adding it in a controlled way
(e.g. just for the references from kernel-include that has an special
argument).

The script also supports now generating a "toc" output, which will be used
at the next series.

5 weeks agodocs: sphinx: drop parse-headers.pl
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:36 +0000 (16:19 +0200)] 
docs: sphinx: drop parse-headers.pl

Now that we have a replacement in place, drop the old version.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/d3a5397df44e53b02fa62f782d1e7ce6e08ed04f.1755872208.git.mchehab+huawei@kernel.org
5 weeks agoscripts: sphinx-build-wrapper: get rid of uapi/media Makefile
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:35 +0000 (16:19 +0200)] 
scripts: sphinx-build-wrapper: get rid of uapi/media Makefile

Now that kernel-include directive supports parsing data
structs directly, we can finally get rid of the horrible hack
we added to support parsing media uAPI symbols.

As a side effect, Documentation/output doesn't have anymore
media auto-generated .rst files on it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/5dbb257a4b283697271c9c7b8f4713857e8191c8.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: document all supported parameters
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:34 +0000 (16:19 +0200)] 
docs: kernel_include.py: document all supported parameters

As we're actually a fork of Sphinx Include, update its
docstring to contain the documentation for the actual
implemented parameters.

Let's use :param: for parameters, as defined at:
https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/f193160889a2dc296b4df2cc7ebc9934d717ccef.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: remove Include class inheritance
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:33 +0000 (16:19 +0200)] 
docs: kernel_include.py: remove Include class inheritance

While the original code came from the Sphinx Include class,
such class is monolithic: it has only one function that does
everything, and 3 variables that are used:

- required_arguments
- optional_arguments
- option_spec

So, basically those are the only members that remain from
the original class, but hey! Those are the same vars that every
other Sphinx directive extension has to define!

In summary, keeping inheritance here doesn't make much sense.

Worse than that, kernel-include doesn't support the current set
of options that the original Include class has, but it also
has its own set of options.

So, let's fill in the argument vars with what it does
support, dropping the rest.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a9f2eebf11c6b0c3a2e3bf42e71392cdfd2835d1.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: remove line numbers from parsed-literal
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:32 +0000 (16:19 +0200)] 
docs: kernel_include.py: remove line numbers from parsed-literal

When parsed-literal directive is added to rawtext, while cross
references will be properly displayed, Sphinx will ignore
line numbers. So, it is not worth adding them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/b484fe5fcbf6e5217f112f205fbf54f0bbc3dcca.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: move apply_range() and add a docstring
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:31 +0000 (16:19 +0200)] 
docs: kernel_include.py: move apply_range() and add a docstring

While not required, better to have caller functions at the end.
As apply_range() is now called by xref_text(), move it to be
before the latter.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a6ce0fd7c03a01338753fd81ed0c4631f78311d6.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: append line numbers to better report errors
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:30 +0000 (16:19 +0200)] 
docs: kernel_include.py: append line numbers to better report errors

It is best to point to the original line of code that generated
an error than to point to the beginning of a directive.

Add support for it. It should be noticed that this won't work
for literal or code blocks, as Sphinx will ignore it, pointing
to the beginning of the directive. Yet, when the output is known
to be in ReST format, like on TOC, this makes the error a lot
more easier to be handled.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a0953af8b71e64aaf2e0ba4593ad39e19587d50a.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: add support to generate a TOC table
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:29 +0000 (16:19 +0200)] 
docs: kernel_include.py: add support to generate a TOC table

When generate-cross-refs is used, instead of just implementing
the default of generating a literal block, we can also
generate a ReST file as a TOC.

The advantage is that, by being a ReST file, missing references
will point to the place inside the header file that has the
broken link.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/c0d32cd1ef94017e05984b0a38bd2516f7db21e2.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: move code and literal functions
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:28 +0000 (16:19 +0200)] 
docs: kernel_include.py: move code and literal functions

Simplify run() even more by moving the code which handles
with code and literal blocks to their own functions.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/78d08dfa3f08adabc30bf93b8a1cde4e19b7bd41.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: remove range restriction for gen docs
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:27 +0000 (16:19 +0200)] 
docs: kernel_include.py: remove range restriction for gen docs

Originally, parse-readers were generating an output where
the first two lines were setting a literal block.

The script now gets only the actual parsed data without that,
so it is now safe to allow start-line and end-line parameters
to be handled.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/5dff693860a6a3faade15c24abdc380f09db468d.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: move range logic to a separate function
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:26 +0000 (16:19 +0200)] 
docs: kernel_include.py: move range logic to a separate function

Cleanup run() function by moving the range logic to a separate
function.

Here, I ended checking the current Sphinx implementation, as it
has some extra logic for the range check.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/12fa2204a9e7e309ae4b8694a37ebad9327ca634.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: move rawtext logic to separate functions
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:25 +0000 (16:19 +0200)] 
docs: kernel_include.py: move rawtext logic to separate functions

The run function is too complex. merge run() and _run() into
a single function and move the read logic to separate functions.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/04776a94c85b6c931c198a149f08b299c9f571a3.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: generate warnings for broken refs
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:24 +0000 (16:19 +0200)] 
docs: kernel_include.py: generate warnings for broken refs

In the past, Sphinx used to warn about broken references. That's
basically the rationale for adding media uAPI files: to get
warnings about missed symbols.

This is not true anymore. So, we need to explicitly check them
after doctree-resolved event.

While here, move setup() to the end, to make it closer to
what we do on other extensions.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/73be9a198746421687e2eee916ccf8bf67980b7d.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: allow cross-reference generation
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:23 +0000 (16:19 +0200)] 
docs: kernel_include.py: allow cross-reference generation

kernel_include extension was originally designed to be used by the
media comprehensive uAPI documentation, where, instead of simpler
kernel-doc markups, the uAPI documentation is enriched with a larger
text, with images, complex tables, graphs, etc.

There, we wanted to include the much simpler yet documented .h
file.

This extension is needed to include files from other parts of the
Kernel tree outside Documentation, because the original Sphinx
include tag doesn't allow going outside of the directory passed
via sphinx-build command line.

Yet, the cross-references themselves to the full documentation
were using a perl script to create cross-references against the
comprehensive documentation.

As the perl script is now converted to Phython and there is a
Python class producing an include-compatible output with cross
references, add two optional arguments to kernel_include.py:

1. :generate-cross-refs:

        If present, instead of reading the file, it calls ParseDataStructs()
        class, which converts C data structures into cross-references to
        be linked to ReST files containing a more comprehensive documentation;

        Don't use it together with :start-line: and/or :end-line:, as
        filtering input file line range is currently not supported.

2. :exception-file:

        Used together with :generate-cross-refs:. Points to a file containing
        rules to ignore C data structs or to use a different reference name,
        optionally using a different reference type.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/efc39c8e54a2056ae2fdb94d5006fcb19e227198.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: kernel_include.py: Update its coding style
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:22 +0000 (16:19 +0200)] 
docs: kernel_include.py: Update its coding style

With the help of tools like black, pylint, autopep8 and flake,
improve the code style in preparation for further changes.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/f64c3af47fdfd632bb5f8eb88e3c7d94b0b84a66.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: uapi: media: Makefile: use parse-headers.py
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:21 +0000 (16:19 +0200)] 
docs: uapi: media: Makefile: use parse-headers.py

Now that we have a new parser, use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/7025759744f74058eee55c35e8cd8cb5a2953fca.1755872208.git.mchehab+huawei@kernel.org
5 weeks agoMAINTAINERS: add files from tools/docs to documentation entry
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:20 +0000 (16:19 +0200)] 
MAINTAINERS: add files from tools/docs to documentation entry

As we now have a tools directory for docs, add it to its
corresponding entry.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/87bbb94e442fe747e24f801d7685856b392b2568.1755872208.git.mchehab+huawei@kernel.org
5 weeks agotools: docs: parse_data_structs.py: add methods to return output
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:19 +0000 (16:19 +0200)] 
tools: docs: parse_data_structs.py: add methods to return output

When running it from command line, we want to write an output
file, but when used as a class, one may just want the output
content returned as a string.

Split write_output() on two methods to allow both usecases.

Also add an extra method to produce a TOC.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/c98bdec3380aad54178baf2751a2f1fcd128576b.1755872208.git.mchehab+huawei@kernel.org
5 weeks agotools: docs: parse-headers.py: move it from sphinx dir
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:18 +0000 (16:19 +0200)] 
tools: docs: parse-headers.py: move it from sphinx dir

As suggested by Jon, we should start having a tools/docs
directory, instead of placing everything under scripts.

In the specific case of parse-headers.py, the previous
location is where we're placing Sphinx extensions, which is
not the right place for execs.

Move it to tools/docs/parse-headers.py.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/0f5ac2d704cffe9834e589b39549d2393e1237ef.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: parse-headers.py: simplify the rules for hashes
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:17 +0000 (16:19 +0200)] 
docs: parse-headers.py: simplify the rules for hashes

Normal :ref domain accept either hashes or underscores, but
c-domain ones don't. Fix it and remove unneeded places where
we opt to disable underscore transformation.

Ideally, we should have a rule about the default, or change
the way media docs have their references.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/0c011090272f7a1068545409222f970ddb1ed431.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: parse-headers.py: better handle @var arguments
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:16 +0000 (16:19 +0200)] 
docs: parse-headers.py: better handle @var arguments

The kernel-doc markups inside headers may contain @var markups.

With the current rule, this would be converted into:

     \* @:c:type:`DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR <dmx_buffer_flags>`\:

Fix it adding a non-printed space if needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/8d06bb713d6ec8de65179dd93defe479715409b6.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: parse-headers.py: improve --help logic
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:15 +0000 (16:19 +0200)] 
docs: parse-headers.py: improve --help logic

When printing --help, we'd like the name of the files
from __doc__ to match the displayed positional arguments at
both usage and argument description lines.

Use a custom formatter class to convert ``foo`` into ANSI SGR
code to bold the argument, if is TTY, and adjust the help
text to match the argument names.

Here on Plasma, that makes it display it colored, wich is
really cool. Yet, I opted for SGR, as the best is to follow
the terminal color schema for bold.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/2c1e61d1fb1b2a2838b443beee89c1528831997f.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: parse-headers.py: convert parse-headers.pl
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:14 +0000 (16:19 +0200)] 
docs: parse-headers.py: convert parse-headers.pl

When the Kernel started to use Sphinx, we had to come up with
a solution to parse media headers. On that time, we didn't have
much experience with Sphinx extensions. So, we came up with our
own script-based solution that were basically implementing a
set of rules we used to have at the Makefile.

Convert it to Python, keeping it bug-compatible with the
original script.

While here, try to better document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/ae5cfa8dff37e280cc9493fc95a51cd0cc0ba127.1755872208.git.mchehab+huawei@kernel.org
5 weeks agodocs: parse-headers.pl: improve its debug output format
Mauro Carvalho Chehab [Fri, 22 Aug 2025 14:19:13 +0000 (16:19 +0200)] 
docs: parse-headers.pl: improve its debug output format

Change the --debug logic to help comparing its results with
a new python script.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/1064011717951eac257889a3032303c9d4440711.1755872208.git.mchehab+huawei@kernel.org
5 weeks agoDocumentation: ocfs2: Properly reindent filecheck operations list
Bagas Sanjaya [Tue, 26 Aug 2025 02:47:56 +0000 (09:47 +0700)] 
Documentation: ocfs2: Properly reindent filecheck operations list

Some of texts in filecheck operations list are indented out of the list.
In particular, the third operation is shown not as the third list
item but rather as a separate paragraph.

Reindent the list so that gets properly rendered as such.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250826024756.16073-1-bagasdotme@gmail.com
5 weeks agodocs: driver-api pinctrl cleanup
Alex Tran [Wed, 27 Aug 2025 07:45:25 +0000 (00:45 -0700)] 
docs: driver-api pinctrl cleanup

Replace FIXME comments in the pinctrl documentation example with
proper cleanup code:
- Add devm_pinctrl_put() calls in error paths
  (pinctrl_lookup_state, pinctrl_select_state)
  after successful devm_pinctrl_get()
- Set foo->p to NULL when devm_pinctrl_get() fails
- Add ret variable for cleaner error handling
- provides proper example of pinctrl resource management on failure

Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250827074525.685863-1-alex.t.tran@gmail.com
6 weeks agoMerge branch 'mauro-pdf' into docs-mw
Jonathan Corbet [Thu, 21 Aug 2025 20:09:21 +0000 (14:09 -0600)] 
Merge branch 'mauro-pdf' into docs-mw

Here it is the second version of the PDF series. I opted to split one of
the patches in 3, to have a clearer changelog and description.

Also, archlinux LXC image download started working again, so I added
an extra patch addressing texlive packae dependencies.

This series is taking me a way more time than antecipated.

This series as 3 goals:

1. Fix a pre-Sphinx 1.7 PDF variable that got renamed, but
   our Makefile still uses the old one that is not supported
   since Sphinx 1.7;

2. Fix broken or incomplete texlive dependencies on several
   distros;

4. "modernize" conf.py to solve font conflicts related to UTF-8
   and non-UTF fonts from [T1]{fontenc}  LaTeX package.

   Using fontenc with xelatex is problematic, as documented at

https://www.sphinx-doc.org/en/master/latex.html

Please notice that:

- It doesn't pretend to fix all  PDF issues. It focus only at the
  above;
- there are still distros where PDF builds fail either partially
  or as a hole. On my checks, those are due to problematic
  texlive packages shipped on such distros;
- it doesn't touch/address/alter anyhing related to kfigure.py.
  as such, it doesn't touch/change/improve/drop anything with
  regards ImageMagick and/or Inkscape.

6 weeks agoscripts/sphinx-pre-install: fix Archlinux PDF dependencies
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:50 +0000 (10:16 +0200)] 
scripts/sphinx-pre-install: fix Archlinux PDF dependencies

There are some missing packages causing PDF build to fail on
Archlinux and add latexmk (from texlive-binextra package).

Yet, at least today, PDF builds are failing on a very late
stage, when trying to run xdvipdfmx:

$ xdvipdfmx -E -o "peci.pdf"  "peci.xdv"
xdvipdfmx:fatal: Unrecognized paper format: # Simply write the paper name. See man 1 paper and "paper --no-size --all" for possible values

Despite its message, even using a very simple document like:

        \def\sphinxdocclass{report}
\documentclass[a4paper,11pt,english]{sphinxmanual}
\begin{document}
Test
\end{document}

or even:

\def\sphinxdocclass{report}
\documentclass{sphinxmanual}
\begin{document}
Test
\end{document}

Is causing xdvipdfmx to complain about geometry. As Archlinux is
a rolling release distro, maybe I got it on a bad day. So, let's
fix it in the hope that soon enough someone would fix the issues
there.

Such broken scenario happens with those packages installed:

texlive-basic 2025.2-1
texlive-bin 2025.2-1
texlive-binextra 2025.2-1
texlive-fontsrecommended 2025.2-1
texlive-langchinese 2025.2-1
texlive-langcjk 2025.2-1
texlive-latex 2025.2-1
texlive-latexextra 2025.2-1
texlive-latexrecommended 2025.2-1
texlive-pictures 2025.2-1
texlive-xetex 2025.2-1
python-docutils 1:0.21.2-3
python-sphinx 8.2.3-1
python-sphinx-alabaster-theme 1.0.0-4
python-sphinxcontrib-applehelp 2.0.0-3
python-sphinxcontrib-devhelp 2.0.0-4
python-sphinxcontrib-htmlhelp 2.1.0-3
python-sphinxcontrib-jsmath 1.0.1-19
python-sphinxcontrib-qthelp 2.0.0-3
python-sphinxcontrib-serializinghtml 2.0.0-3

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/574d902f7691861e18339217f42409850ee58791.1755763127.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: fix PDF dependencies for gentoo
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:49 +0000 (10:16 +0200)] 
scripts: sphinx-pre-install: fix PDF dependencies for gentoo

Package fonts are wrong. Fix it. With that, most PDF files
now builds.

  PDF docs:
  ---------
      PASSED: dev-tools: pdf/dev-tools.pdf
      PASSED: tools: pdf/tools.pdf
      PASSED: filesystems: pdf/filesystems.pdf
      PASSED: w1: pdf/w1.pdf
      PASSED: maintainer: pdf/maintainer.pdf
      PASSED: process: pdf/process.pdf
      PASSED: isdn: pdf/isdn.pdf
      PASSED: fault-injection: pdf/fault-injection.pdf
      PASSED: iio: pdf/iio.pdf
      PASSED: scheduler: pdf/scheduler.pdf
      PASSED: staging: pdf/staging.pdf
      PASSED: fpga: pdf/fpga.pdf
      PASSED: power: pdf/power.pdf
      PASSED: leds: pdf/leds.pdf
      PASSED: edac: pdf/edac.pdf
      PASSED: PCI: pdf/PCI.pdf
      PASSED: firmware-guide: pdf/firmware-guide.pdf
      PASSED: cpu-freq: pdf/cpu-freq.pdf
      PASSED: mhi: pdf/mhi.pdf
      PASSED: wmi: pdf/wmi.pdf
      PASSED: timers: pdf/timers.pdf
      PASSED: accel: pdf/accel.pdf
      PASSED: hid: pdf/hid.pdf
      FAILED: userspace-api: Build failed (FAILED)
      PASSED: spi: pdf/spi.pdf
      PASSED: networking: pdf/networking.pdf
      PASSED: virt: pdf/virt.pdf
      PASSED: nvme: pdf/nvme.pdf
      FAILED: translations: Build failed (FAILED)
      PASSED: input: pdf/input.pdf
      PASSED: tee: pdf/tee.pdf
      PASSED: doc-guide: pdf/doc-guide.pdf
      PASSED: cdrom: pdf/cdrom.pdf
      FAILED: gpu: Build failed (FAILED)
      FAILED: i2c: Build failed (FAILED)
      FAILED: RCU: Build failed (FAILED)
      PASSED: watchdog: pdf/watchdog.pdf
      PASSED: usb: pdf/usb.pdf
      PASSED: rust: pdf/rust.pdf
      PASSED: crypto: pdf/crypto.pdf
      PASSED: kbuild: pdf/kbuild.pdf
      PASSED: livepatch: pdf/livepatch.pdf
      PASSED: mm: pdf/mm.pdf
      PASSED: locking: pdf/locking.pdf
      PASSED: infiniband: pdf/infiniband.pdf
      PASSED: driver-api: pdf/driver-api.pdf
      PASSED: bpf: pdf/bpf.pdf
      PASSED: devicetree: pdf/devicetree.pdf
      PASSED: block: pdf/block.pdf
      PASSED: target: pdf/target.pdf
      FAILED: arch: Build failed (FAILED)
      PASSED: pcmcia: pdf/pcmcia.pdf
      PASSED: scsi: pdf/scsi.pdf
      PASSED: netlabel: pdf/netlabel.pdf
      PASSED: sound: pdf/sound.pdf
      PASSED: security: pdf/security.pdf
      PASSED: accounting: pdf/accounting.pdf
      PASSED: admin-guide: pdf/admin-guide.pdf
      FAILED: core-api: Build failed (FAILED)
      PASSED: fb: pdf/fb.pdf
      PASSED: peci: pdf/peci.pdf
      PASSED: trace: pdf/trace.pdf
      PASSED: misc-devices: pdf/misc-devices.pdf
      PASSED: kernel-hacking: pdf/kernel-hacking.pdf
      PASSED: hwmon: pdf/hwmon.pdf

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/1ccbac9fd1f4e598dda82e775b64768ec3696248.1755763127.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: fix pdf dependencies for Mageia 9
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:48 +0000 (10:16 +0200)] 
scripts: sphinx-pre-install: fix pdf dependencies for Mageia 9

On Mageia 9, two packages are missing. Add them.

With that, all PDF packages now build:

Mageia 9:
---------
    PASSED: OS detection: Mageia 9
    PASSED: System packages: Packages installed
    PASSED: Sphinx on venv: Sphinx Sphinx 8.1.3
    PASSED: Sphinx package: Sphinx Sphinx 6.1.3
    PASSED: Clean documentation: Build time: 0:00, return code: 0
    PASSED: Build HTML documentation: Build time: 5:17, return code: 0
    PASSED: Build PDF documentation: Build time: 14:28, return code: 0

  PDF docs:
  ---------
      PASSED: dev-tools: pdf/dev-tools.pdf
      PASSED: tools: pdf/tools.pdf
      PASSED: filesystems: pdf/filesystems.pdf
      PASSED: w1: pdf/w1.pdf
      PASSED: maintainer: pdf/maintainer.pdf
      PASSED: process: pdf/process.pdf
      PASSED: isdn: pdf/isdn.pdf
      PASSED: fault-injection: pdf/fault-injection.pdf
      PASSED: iio: pdf/iio.pdf
      PASSED: scheduler: pdf/scheduler.pdf
      PASSED: staging: pdf/staging.pdf
      PASSED: fpga: pdf/fpga.pdf
      PASSED: power: pdf/power.pdf
      PASSED: leds: pdf/leds.pdf
      PASSED: edac: pdf/edac.pdf
      PASSED: PCI: pdf/PCI.pdf
      PASSED: firmware-guide: pdf/firmware-guide.pdf
      PASSED: cpu-freq: pdf/cpu-freq.pdf
      PASSED: mhi: pdf/mhi.pdf
      PASSED: wmi: pdf/wmi.pdf
      PASSED: timers: pdf/timers.pdf
      PASSED: accel: pdf/accel.pdf
      PASSED: hid: pdf/hid.pdf
      PASSED: userspace-api: pdf/userspace-api.pdf
      PASSED: spi: pdf/spi.pdf
      PASSED: networking: pdf/networking.pdf
      PASSED: virt: pdf/virt.pdf
      PASSED: nvme: pdf/nvme.pdf
      PASSED: translations: pdf/translations.pdf
      PASSED: input: pdf/input.pdf
      PASSED: tee: pdf/tee.pdf
      PASSED: doc-guide: pdf/doc-guide.pdf
      PASSED: cdrom: pdf/cdrom.pdf
      PASSED: gpu: pdf/gpu.pdf
      PASSED: i2c: pdf/i2c.pdf
      PASSED: RCU: pdf/RCU.pdf
      PASSED: watchdog: pdf/watchdog.pdf
      PASSED: usb: pdf/usb.pdf
      PASSED: rust: pdf/rust.pdf
      PASSED: crypto: pdf/crypto.pdf
      PASSED: kbuild: pdf/kbuild.pdf
      PASSED: livepatch: pdf/livepatch.pdf
      PASSED: mm: pdf/mm.pdf
      PASSED: locking: pdf/locking.pdf
      PASSED: infiniband: pdf/infiniband.pdf
      PASSED: driver-api: pdf/driver-api.pdf
      PASSED: bpf: pdf/bpf.pdf
      PASSED: devicetree: pdf/devicetree.pdf
      PASSED: block: pdf/block.pdf
      PASSED: target: pdf/target.pdf
      PASSED: arch: pdf/arch.pdf
      PASSED: pcmcia: pdf/pcmcia.pdf
      PASSED: scsi: pdf/scsi.pdf
      PASSED: netlabel: pdf/netlabel.pdf
      PASSED: sound: pdf/sound.pdf
      PASSED: security: pdf/security.pdf
      PASSED: accounting: pdf/accounting.pdf
      PASSED: admin-guide: pdf/admin-guide.pdf
      PASSED: core-api: pdf/core-api.pdf
      PASSED: fb: pdf/fb.pdf
      PASSED: peci: pdf/peci.pdf
      PASSED: trace: pdf/trace.pdf
      PASSED: misc-devices: pdf/misc-devices.pdf
      PASSED: kernel-hacking: pdf/kernel-hacking.pdf
      PASSED: hwmon: pdf/hwmon.pdf

Summary
=======
  PASSED - Mageia 9 (7 tests)

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/bd6e03c79b890ad0168493cdb4cdaf610bbc8c45.1755763127.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: fix dependencies for OpenMandriva
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:47 +0000 (10:16 +0200)] 
scripts: sphinx-pre-install: fix dependencies for OpenMandriva

The dependeny list for OpenMandriva is wrong. Update it.

Yet, on my tests with OpenMandriva LX 4.3, the texlive packages are
broken: xelatex can't build anything there, as it lacks xelatex.sfm.

Yet, this could be a problem at the way I created the container.
Just in case, add a note about that.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/669e759ba366328e5c8d5b14a591ba45a1f58176.1755763127.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: fix PDF dependencies for openSuse
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:46 +0000 (10:16 +0200)] 
scripts: sphinx-pre-install: fix PDF dependencies for openSuse

The dependencies are outdated: both versions need texlive-dejavu
fonts. Also, for PDF generation, python311-Sphinx-latex is
required.

With that, all PDF files are now tuilt on both:

openSUSE Leap 15.6:
-------------------
    PASSED: OS detection: openSUSE Leap 15.6
    SKIPPED (Sphinx Sphinx 7.2.6): System packages
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
    PASSED: Clean documentation: Build time: 0:00, return code: 0
    PASSED: Build HTML documentation: Build time: 5:29, return code: 0
    PASSED: Build PDF documentation: Build time: 13:45, return code: 0

openSUSE Tumbleweed:
--------------------
    PASSED: OS detection: openSUSE Tumbleweed
    SKIPPED (Sphinx Sphinx 8.2.3): System packages
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
    PASSED: Clean documentation: Build time: 0:00, return code: 0
    PASSED: Build HTML documentation: Build time: 4:33, return code: 0
    PASSED: Build PDF documentation: Build time: 13:18, return code: 0

Summary
=======
  PASSED - openSUSE Leap 15.6 (7 tests)
  PASSED - openSUSE Tumbleweed (7 tests)

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/d78457376f9dfd24cb7ac3a32895c654412715f3.1755763127.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: add missing gentoo pdf dependencies
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:45 +0000 (10:16 +0200)] 
scripts: sphinx-pre-install: add missing gentoo pdf dependencies

There are two packages that are required to build PDF at gentoo:

dev-texlive/texlive-latexextra
media-fonts/lm

Place latex_dependencies on a list to make it easier to maintain
and add the missing ones.

With that, most PDF documents now build on Gentoo:

Gentoo Base System release 2.17:
--------------------------------
    PASSED: OS detection: Gentoo Base System release 2.17
    SKIPPED (Sphinx Sphinx 8.2.3): System packages
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
    PASSED: Clean documentation: Build time: 0:00, return code: 0
    PASSED: Build HTML documentation: Build time: 5:28, return code: 0
    PARTIAL: Build PDF documentation: Test failed (Build time: 9:19, return code: 2)

  PDF docs:
  ---------
      PASSED: dev-tools: pdf/dev-tools.pdf
      PASSED: tools: pdf/tools.pdf
      PASSED: filesystems: pdf/filesystems.pdf
      PASSED: w1: pdf/w1.pdf
      PASSED: maintainer: pdf/maintainer.pdf
      PASSED: process: pdf/process.pdf
      PASSED: isdn: pdf/isdn.pdf
      PASSED: fault-injection: pdf/fault-injection.pdf
      PASSED: iio: pdf/iio.pdf
      PASSED: scheduler: pdf/scheduler.pdf
      PASSED: staging: pdf/staging.pdf
      PASSED: fpga: pdf/fpga.pdf
      PASSED: power: pdf/power.pdf
      PASSED: leds: pdf/leds.pdf
      PASSED: edac: pdf/edac.pdf
      PASSED: PCI: pdf/PCI.pdf
      PASSED: firmware-guide: pdf/firmware-guide.pdf
      PASSED: cpu-freq: pdf/cpu-freq.pdf
      PASSED: mhi: pdf/mhi.pdf
      PASSED: wmi: pdf/wmi.pdf
      PASSED: timers: pdf/timers.pdf
      PASSED: accel: pdf/accel.pdf
      PASSED: hid: pdf/hid.pdf
      FAILED: userspace-api: Build failed (FAILED)
      PASSED: spi: pdf/spi.pdf
      PASSED: networking: pdf/networking.pdf
      PASSED: virt: pdf/virt.pdf
      PASSED: nvme: pdf/nvme.pdf
      FAILED: translations: Build failed (FAILED)
      PASSED: input: pdf/input.pdf
      PASSED: tee: pdf/tee.pdf
      PASSED: doc-guide: pdf/doc-guide.pdf
      PASSED: cdrom: pdf/cdrom.pdf
      FAILED: gpu: Build failed (FAILED)
      FAILED: i2c: Build failed (FAILED)
      FAILED: RCU: Build failed (FAILED)
      PASSED: watchdog: pdf/watchdog.pdf
      PASSED: usb: pdf/usb.pdf
      PASSED: rust: pdf/rust.pdf
      PASSED: crypto: pdf/crypto.pdf
      PASSED: kbuild: pdf/kbuild.pdf
      PASSED: livepatch: pdf/livepatch.pdf
      PASSED: mm: pdf/mm.pdf
      PASSED: locking: pdf/locking.pdf
      PASSED: infiniband: pdf/infiniband.pdf
      PASSED: driver-api: pdf/driver-api.pdf
      PASSED: bpf: pdf/bpf.pdf
      PASSED: devicetree: pdf/devicetree.pdf
      PASSED: block: pdf/block.pdf
      PASSED: target: pdf/target.pdf
      FAILED: arch: Build failed (FAILED)
      PASSED: pcmcia: pdf/pcmcia.pdf
      PASSED: scsi: pdf/scsi.pdf
      PASSED: netlabel: pdf/netlabel.pdf
      PASSED: sound: pdf/sound.pdf
      PASSED: security: pdf/security.pdf
      PASSED: accounting: pdf/accounting.pdf
      PASSED: admin-guide: pdf/admin-guide.pdf
      FAILED: core-api: Build failed (FAILED)
      PASSED: fb: pdf/fb.pdf
      PASSED: peci: pdf/peci.pdf
      PASSED: trace: pdf/trace.pdf
      PASSED: misc-devices: pdf/misc-devices.pdf
      PASSED: kernel-hacking: pdf/kernel-hacking.pdf
      PASSED: hwmon: pdf/hwmon.pdf

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/0ac8d6b7484aaf930917c8edde53742d425e7e8f.1755763127.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: fix PDF build issues on Ubuntu
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:44 +0000 (10:16 +0200)] 
scripts: sphinx-pre-install: fix PDF build issues on Ubuntu

PDF output with current Debian-based distros require other
packages for it to work. The main one is pzdr.tfm. Without
that, \sphinxhyphen{} won't work, affecting multiple docs.

For CJK, tex-gyre is required.

Add the missing packages to the list.

After the change, all PDF files build on latest Ubuntu:

Ubuntu 25.04:
-------------
    PASSED: OS detection: Ubuntu 25.04
    SKIPPED (Sphinx Sphinx 8.1.3): System packages
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx on venv
    SKIPPED (Sphinx already installed either as venv or as native package): Sphinx package
    PASSED: Clean documentation: Build time: 0:00, return code: 0
    PASSED: Build HTML documentation: Build time: 3:28, return code: 0
    PASSED: Build PDF documentation: Build time: 11:08, return code: 0

  PDF docs:
  ---------
      PASSED: dev-tools: pdf/dev-tools.pdf
      PASSED: tools: pdf/tools.pdf
      PASSED: filesystems: pdf/filesystems.pdf
      PASSED: w1: pdf/w1.pdf
      PASSED: maintainer: pdf/maintainer.pdf
      PASSED: process: pdf/process.pdf
      PASSED: isdn: pdf/isdn.pdf
      PASSED: fault-injection: pdf/fault-injection.pdf
      PASSED: iio: pdf/iio.pdf
      PASSED: scheduler: pdf/scheduler.pdf
      PASSED: staging: pdf/staging.pdf
      PASSED: fpga: pdf/fpga.pdf
      PASSED: power: pdf/power.pdf
      PASSED: leds: pdf/leds.pdf
      PASSED: edac: pdf/edac.pdf
      PASSED: PCI: pdf/PCI.pdf
      PASSED: firmware-guide: pdf/firmware-guide.pdf
      PASSED: cpu-freq: pdf/cpu-freq.pdf
      PASSED: mhi: pdf/mhi.pdf
      PASSED: wmi: pdf/wmi.pdf
      PASSED: timers: pdf/timers.pdf
      PASSED: accel: pdf/accel.pdf
      PASSED: hid: pdf/hid.pdf
      PASSED: userspace-api: pdf/userspace-api.pdf
      PASSED: spi: pdf/spi.pdf
      PASSED: networking: pdf/networking.pdf
      PASSED: virt: pdf/virt.pdf
      PASSED: nvme: pdf/nvme.pdf
      PASSED: translations: pdf/translations.pdf
      PASSED: input: pdf/input.pdf
      PASSED: tee: pdf/tee.pdf
      PASSED: doc-guide: pdf/doc-guide.pdf
      PASSED: cdrom: pdf/cdrom.pdf
      PASSED: gpu: pdf/gpu.pdf
      PASSED: i2c: pdf/i2c.pdf
      PASSED: RCU: pdf/RCU.pdf
      PASSED: watchdog: pdf/watchdog.pdf
      PASSED: usb: pdf/usb.pdf
      PASSED: rust: pdf/rust.pdf
      PASSED: crypto: pdf/crypto.pdf
      PASSED: kbuild: pdf/kbuild.pdf
      PASSED: livepatch: pdf/livepatch.pdf
      PASSED: mm: pdf/mm.pdf
      PASSED: locking: pdf/locking.pdf
      PASSED: infiniband: pdf/infiniband.pdf
      PASSED: driver-api: pdf/driver-api.pdf
      PASSED: bpf: pdf/bpf.pdf
      PASSED: devicetree: pdf/devicetree.pdf
      PASSED: block: pdf/block.pdf
      PASSED: target: pdf/target.pdf
      PASSED: arch: pdf/arch.pdf
      PASSED: pcmcia: pdf/pcmcia.pdf
      PASSED: scsi: pdf/scsi.pdf
      PASSED: netlabel: pdf/netlabel.pdf
      PASSED: sound: pdf/sound.pdf
      PASSED: security: pdf/security.pdf
      PASSED: accounting: pdf/accounting.pdf
      PASSED: admin-guide: pdf/admin-guide.pdf
      PASSED: core-api: pdf/core-api.pdf
      PASSED: fb: pdf/fb.pdf
      PASSED: peci: pdf/peci.pdf
      PASSED: trace: pdf/trace.pdf
      PASSED: misc-devices: pdf/misc-devices.pdf
      PASSED: kernel-hacking: pdf/kernel-hacking.pdf
      PASSED: hwmon: pdf/hwmon.pdf

Reported-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/b5e2e0df68b377b148fdbdd721f6c1cbefe6f861.1755763127.git.mchehab+huawei@kernel.org
6 weeks agodocs: conf.py: extra cleanups and fixes
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:43 +0000 (10:16 +0200)] 
docs: conf.py: extra cleanups and fixes

Makes it more adehent with modern Sphinx LaTeX build setup as
defined at:

https://www.sphinx-doc.org/en/master/latex.html

There, it suggests:

1) to add: 'printindex'

    “printindex” call, the last thing in the file. Override if you want to generate
    the index differently, append some content after the index, or change the font.
    As LaTeX uses two-column mode for the index it is often advisable to set this
    key to r'\footnotesize\raggedright\printindex'.

This indeed solved a corner case on a distro where the index was not properly
generated.

2) to add at the main example:
         \PassOptionsToPackage{svgnames}{xcolor}

3) I got a corner case on one of the distros was using xindy to produce
   indexes. This ended causing the build logic to incorretly try to use
   T1 fontenc, which is not UTF-8 compatible.

   This patch adds:

        \PassOptionsToPackage{xindy}{language=english,codepage=utf8,noautomatic}

   to cover such case. It should be noticed that, as the config doesn't
   have \usepackage{xindy}, this will be used only if latexmk ends
   using xindy.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/08d16c2ad817910eb5606842f776d3f77d83282f.1755763127.git.mchehab+huawei@kernel.org
6 weeks agodocs: conf.py: fix some troubles for LaTeX output
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:42 +0000 (10:16 +0200)] 
docs: conf.py: fix some troubles for LaTeX output

While PDF docs work fine on RPM-based distros, it causes conflicts
on Debian & friends.

There are multiple root causes here:

- the latex_elements still resambles the one from Sphinx 1.x
  times, where font configurations were stored under
  "preamble". It doesn't follow the current recommended way from
  Sphinx documentation:

https://www.sphinx-doc.org/en/master/latex.html

- instead of setting the main font, from where other fonts are
  derivated, it sets romanfont;

- "fontenc" is not set. This allows the *.tex output file to
  contain an UTF-8 incompatible fontset:

\usepackage[T1]{fontenc}

Address such issues to help preventing incompatible usage of
both T1 font and UTF-8 ones that comes from DejaVu font
family.

On some distros, this even generate a LaTeX font warning about
corrupted NFSS tables like this (I got it when running it in
interactive mode):

Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
LaTeX Font Info:    Trying to load font information for T1+lmr on input line 11
6.
LaTeX Font Info:    No file T1lmr.fd. on input line 116.

LaTeX Font Warning: Font shape `T1/lmr/m/n' undefined
(Font)              using `T1/lmr/m/n' instead on input line 116.

! Corrupted NFSS tables.
wrong@fontshape ...message {Corrupted NFSS tables}
                                                  error@fontshape else let f...
l.116 ...\familydefault\seriesdefault\shapedefault

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/8104ce56a5ea3509fbb56a8163b779d38a6aaa9c.1755763127.git.mchehab+huawei@kernel.org
6 weeks agodocs: conf.py: use dedent and r-strings for LaTeX macros
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:41 +0000 (10:16 +0200)] 
docs: conf.py: use dedent and r-strings for LaTeX macros

Instead of adding extra weird indentation at the tex
file, use dedent(). While here, also use r-strings, to make
easier to make its content identical to the .tex output.

While here, also merge "preamble" that was added on two
separate parts of the code (in the past, there were some
version-specific checks).

No functional changes, just cosmetic ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/0d245fbd872ab3ec21bd8fe78b01340ba77ce365.1755763127.git.mchehab+huawei@kernel.org
6 weeks agodocs: conf.py: rename some vars at latex_documents logic
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:40 +0000 (10:16 +0200)] 
docs: conf.py: rename some vars at latex_documents logic

Currently, the logic uses fn and doc vars, but they don't
properly describe what such vars do.

Make them clearer:
- fname: points to the file name to search (index.rst);
- doc: contains the name of the LaTeX or PDF doc to
  be produced.

With that, the checks for SPHINXDIRS and for subdirs will
be more coherent.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/b030d9bc53550905adbe9367b2a3915d7331b4c5.1755763127.git.mchehab+huawei@kernel.org
6 weeks agodocs: conf.py: fix doc name with SPHINXDIRS
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:39 +0000 (10:16 +0200)] 
docs: conf.py: fix doc name with SPHINXDIRS

When SPHINXDIRS is used, the current logic produces a wrong
list of files, as it will not pick the SPHINXDIRS directory,
picking instead their children.

Add a rule to detect it and create the PDF doc with the right
name.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/183f630643eacf414cfa8d892f03dd1b1055c21e.1755763127.git.mchehab+huawei@kernel.org
6 weeks agodocs: conf.py: better handle latex documents
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:38 +0000 (10:16 +0200)] 
docs: conf.py: better handle latex documents

The original logic assumed that app.srcdir is identical to the
current working dir. This is the case for a normal build, but,
when SPHINXDIRS="some dir" is used, this is not the case anymore.

Adjust the logic to fill the LaTeX documents considering
app.srcdir, in a way that it will work properly on all cases.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/de23b35a770210950c609deaa32b98cb3673a53a.1755763127.git.mchehab+huawei@kernel.org
6 weeks agodocs: Makefile: Fix LaTeX paper size settings
Mauro Carvalho Chehab [Thu, 21 Aug 2025 08:16:37 +0000 (10:16 +0200)] 
docs: Makefile: Fix LaTeX paper size settings

According with:
https://www.sphinx-doc.org/en/master/latex.html

The variable that handles paper size changed during version 1.5,
as pointed at:
https://www.sphinx-doc.org/en/master/changes/1.5.html

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/c50db42ead36010fd42ce1e6a2b9da766c11927b.1755763127.git.mchehab+huawei@kernel.org
6 weeks agoDocumentation: Add real-time to core-api
Sebastian Andrzej Siewior [Fri, 15 Aug 2025 09:38:57 +0000 (11:38 +0200)] 
Documentation: Add real-time to core-api

The documents explain the design concepts behind PREEMPT_RT and highlight key
differences necessary to achieve it.
It also include a list of requirements that must be fulfilled to support
PREEMPT_RT on a given architecture.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
[jc: tweaked "how they differ" section head]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250815093858.930751-4-bigeasy@linutronix.de
6 weeks agoDocumentation: locking: Add local_lock_nested_bh() to locktypes
Sebastian Andrzej Siewior [Fri, 15 Aug 2025 09:38:56 +0000 (11:38 +0200)] 
Documentation: locking: Add local_lock_nested_bh() to locktypes

local_lock_nested_bh() is used within networking where applicable.
Document why it is used and how it behaves.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250815093858.930751-3-bigeasy@linutronix.de
6 weeks agoDocumentation: seqlock: Add a SPDX license identifier
Sebastian Andrzej Siewior [Fri, 15 Aug 2025 09:38:55 +0000 (11:38 +0200)] 
Documentation: seqlock: Add a SPDX license identifier

Add a SPDX identifier. The majority of the document has been written by
Ahmed S. Darwish.

Cc: Ahmed S. Darwish <darwi@linutronix.de>
Acked-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250815093858.930751-2-bigeasy@linutronix.de
6 weeks agodocs: fix trailing whitespace error and remove repeated words in propagate_umount.txt
Raphael Pinsonneault-Thibeault [Mon, 18 Aug 2025 18:19:34 +0000 (14:19 -0400)] 
docs: fix trailing whitespace error and remove repeated words in propagate_umount.txt

in Documentation/filesystems/propagate_umount.txt:
line 289: remove whitespace on blank line
line 315: remove duplicate "that"
line 364: remove duplicate "in"

Signed-off-by: Raphael Pinsonneault-Thibeault <rpthibeault@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250818181934.55491-2-rpthibeault@gmail.com
6 weeks agodocs: sysctl: add a few more top-level /proc/sys entries
Randy Dunlap [Tue, 19 Aug 2025 07:54:56 +0000 (00:54 -0700)] 
docs: sysctl: add a few more top-level /proc/sys entries

Add a few missing directories under /proc/sys.
Fix punctuation and doubled words.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Reviewed-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819075456.113623-1-rdunlap@infradead.org
6 weeks agodocs: Corrected typo in trace/events
Mehdi Ben Hadj Khelifa [Tue, 19 Aug 2025 08:49:00 +0000 (09:49 +0100)] 
docs: Corrected typo in trace/events

-Changed 'Dyamically' to 'Dynamically' in trace/events.rst

under sections 7.1 and 7.3

Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819085040.974388-1-mehdi.benhadjkhelifa@gmail.com
6 weeks agodocs: kernel-parameters: typo fix and add missing SPDX-License tag
Bartlomiej Kubik [Tue, 19 Aug 2025 11:35:51 +0000 (13:35 +0200)] 
docs: kernel-parameters: typo fix and add missing SPDX-License tag

Fix documentation issues by removing a duplicated word and adding the
missing SPDX-License identifier.

Signed-off-by: Bartlomiej Kubik <kubik.bartlomiej@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250819113551.34356-1-kubik.bartlomiej@gmail.com
6 weeks agoDocumentation: driver-api: usb: Limit toctree depth
Bagas Sanjaya [Wed, 20 Aug 2025 05:04:16 +0000 (12:04 +0700)] 
Documentation: driver-api: usb: Limit toctree depth

toctree index in USB driver api docs currently spoils the entire docs
headings due to lack of :maxdepth: option. Add the option to limit
toctree depth to 1, mirroring usb subsystem docs in
Documentation/usb/index.rst.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250820050416.25219-1-bagasdotme@gmail.com
6 weeks agoDocumentation: conf.py: remove repeated word in comment
Albin Babu Varghese [Wed, 20 Aug 2025 19:47:15 +0000 (15:47 -0400)] 
Documentation: conf.py: remove repeated word in comment

Remove a repeated "are" from a comment in conf.py

Signed-off-by: Albin Babu Varghese <albinbabuvarghese20@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250820194714.130513-2-albinbabuvarghese20@gmail.com
7 weeks agodocs: Remove remainders of reiserfs
David Sterba [Wed, 13 Aug 2025 10:00:52 +0000 (12:00 +0200)] 
docs: Remove remainders of reiserfs

Reiserfs has been removed in 6.13, there are still some mentions in the
documentation about it and the tools. Remove those that don't seem
relevant anymore but keep references to reiserfs' r5 hash used by some
code.

There's one change in a script scripts/selinux/install_policy.sh but it
does not seem to be relevant either.

Signed-off-by: David Sterba <dsterba@suse.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813100053.1291961-1-dsterba@suse.com
7 weeks agoMerge branch 'bjorn' into docs-mw
Jonathan Corbet [Mon, 18 Aug 2025 16:40:16 +0000 (10:40 -0600)] 
Merge branch 'bjorn' into docs-mw

A big set of typo fixes from Bjorn Helgaas

7 weeks agoDocumentation: Fix trace typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:05:04 +0000 (15:05 -0500)] 
Documentation: Fix trace typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-9-helgaas@kernel.org
7 weeks agoDocumentation: Fix power typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:05:03 +0000 (15:05 -0500)] 
Documentation: Fix power typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-8-helgaas@kernel.org
7 weeks agoDocumentation: Fix networking typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:05:02 +0000 (15:05 -0500)] 
Documentation: Fix networking typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-7-helgaas@kernel.org
7 weeks agoDocumentation: Fix filesystems typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:05:01 +0000 (15:05 -0500)] 
Documentation: Fix filesystems typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-6-helgaas@kernel.org
7 weeks agoDocumentation: Fix core-api typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:05:00 +0000 (15:05 -0500)] 
Documentation: Fix core-api typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-5-helgaas@kernel.org
7 weeks agoDocumentation: Fix admin-guide typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:04:59 +0000 (15:04 -0500)] 
Documentation: Fix admin-guide typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-4-helgaas@kernel.org
7 weeks agoDocumentation: Fix RCU typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:04:58 +0000 (15:04 -0500)] 
Documentation: Fix RCU typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-3-helgaas@kernel.org
7 weeks agoDocumentation: Fix PCI typos
Bjorn Helgaas [Wed, 13 Aug 2025 20:04:57 +0000 (15:04 -0500)] 
Documentation: Fix PCI typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-2-helgaas@kernel.org
7 weeks agoDocumentation: ktap: Separate first bullet list items
Bagas Sanjaya [Thu, 14 Aug 2025 01:20:46 +0000 (08:20 +0700)] 
Documentation: ktap: Separate first bullet list items

The first bullet list items are shown in htmldocs output as combined
with previous paragraph due to missing blank line separator. Add it.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814012046.21235-3-bagasdotme@gmail.com
7 weeks agoDocumentation: ktap: Correct "its" spelling
Bagas Sanjaya [Thu, 14 Aug 2025 01:20:45 +0000 (08:20 +0700)] 
Documentation: ktap: Correct "its" spelling

Fix possessive adjective "its" spelling.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814012046.21235-2-bagasdotme@gmail.com
7 weeks agodocs: kdoc: remove redundant comment stripping
Jonathan Corbet [Thu, 14 Aug 2025 15:40:35 +0000 (09:40 -0600)] 
docs: kdoc: remove redundant comment stripping

By the time stuff gets to create_parameter_list(), comments have long since
been stripped out, so we do not need to do it again here.

Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-8-corbet@lwn.net
7 weeks agodocs: kdoc: tighten up the pointer-to-function case
Jonathan Corbet [Thu, 14 Aug 2025 15:40:34 +0000 (09:40 -0600)] 
docs: kdoc: tighten up the pointer-to-function case

Tighten up the code and remove an unneeded regex operation.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-7-corbet@lwn.net
7 weeks agodocs: kdoc: tighten up the array-of-pointers case
Jonathan Corbet [Thu, 14 Aug 2025 15:40:33 +0000 (09:40 -0600)] 
docs: kdoc: tighten up the array-of-pointers case

Simplify one gnarly regex and remove another altogether; add a comment
describing what is going on.  There will be no #-substituted commas in this
case, so don't bother trying to put them back.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-6-corbet@lwn.net
7 weeks agodocs: kdoc: add a couple more comments in create_parameter_list()
Jonathan Corbet [Thu, 14 Aug 2025 15:40:32 +0000 (09:40 -0600)] 
docs: kdoc: add a couple more comments in create_parameter_list()

Make what the final code is doing a bit more clear to slow readers like me.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-5-corbet@lwn.net
7 weeks agodocs: kdoc: clean up the create_parameter_list() "first arg" logic
Jonathan Corbet [Thu, 14 Aug 2025 15:40:31 +0000 (09:40 -0600)] 
docs: kdoc: clean up the create_parameter_list() "first arg" logic

The logic for finding the name of the first in a series of variable names
is somewhat convoluted and, in the use of .extend(), actively buggy.
Document what is happening and simplify the logic.

Acked-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-4-corbet@lwn.net
7 weeks agodocs: kdoc: tidy up space removal in create_parameter_list()
Jonathan Corbet [Thu, 14 Aug 2025 15:40:30 +0000 (09:40 -0600)] 
docs: kdoc: tidy up space removal in create_parameter_list()

Remove a redundant test and add a comment describing what the space removal
is doing.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-3-corbet@lwn.net
7 weeks agodocs: kdoc: remove dead code
Jonathan Corbet [Thu, 14 Aug 2025 15:40:29 +0000 (09:40 -0600)] 
docs: kdoc: remove dead code

create_parameter_list() tests an argument against the same regex twice, in
two different locations; remove the pointless extra tests and the
never-executed error cases that go with them.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250814154035.328769-2-corbet@lwn.net