]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
2 weeks agoscripts: add origin commit identification based on specific patterns
Zhiyu Zhang [Sun, 13 Jul 2025 16:34:18 +0000 (00:34 +0800)] 
scripts: add origin commit identification based on specific patterns

This patch adds the functionability to smartly identify origin commit
of the translation by matching the following patterns in commit log:
1) update to commit HASH
2) Update the translation through commit HASH
If no such pattern is found, script will obey the original workflow.

Signed-off-by: Zhiyu Zhang <zhiyuzhang999@gmail.com>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250713163418.1459-1-zhiyuzhang999@gmail.com
2 weeks agosphinx: kernel_abi: fix performance regression with O=<dir>
Mauro Carvalho Chehab [Thu, 17 Jul 2025 11:37:19 +0000 (13:37 +0200)] 
sphinx: kernel_abi: fix performance regression with O=<dir>

The logic there which adds a dependency note to Sphinx cache
is not taking into account that the build dir may not be
the source dir. This causes a performance regression:

$ time make O=/tmp/foo SPHINXDIRS=admin-guide htmldocs

[OUTDATED]
Added: set()
Changed: {'abi-obsolete', 'abi-removed', 'abi-stable-files', 'abi-obsolete-files', 'abi-stable', 'abi', 'abi-removed-files', 'abi-testing-files', 'abi-testing', 'gpio/index', 'gpio/obsolete'}
Removed: set()
All docs count: 385
Found docs count: 385

real    0m11,324s
user    0m15,783s
sys     0m1,164s

To get the root cause of the problem (ABI files reported as changed),
I used this changeset:

diff --git a/Documentation/conf.py b/Documentation/conf.py
index e8766e689c1b..ab486623bd8b 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -571,3 +571,16 @@ def setup(app):
     """Patterns need to be updated at init time on older Sphinx versions"""

     app.connect('config-inited', update_patterns)
+    app.connect('env-get-outdated', on_outdated)
+
+def on_outdated(app, env, added, changed, removed):
+    """Track cache outdated due to added/changed/removed files"""
+    print("\n[OUTDATED]")
+    print(f"Added: {added}")
+    print(f"Changed: {changed}")
+    print(f"Removed: {removed}")
+    print(f"All docs count: {len(env.all_docs)}")
+    print(f"Found docs count: {len(env.found_docs)}")
+
+    # Just return what we have
+    return added | changed | removed

Reported-by: Akira Yokosawa <akiyks@gmail.com>
Closes: https://lore.kernel.org/linux-doc/c174f7c5-ec21-4eae-b1c3-f643cca90d9d@gmail.com/
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/e25673d87357457bc54ee863e97ff8f75956580d.1752752211.git.mchehab+huawei@kernel.org
2 weeks agoDocumentation: core-api: entry: Replace deprecated KVM entry/exit functions
Andrew Donnellan [Wed, 23 Jul 2025 07:51:34 +0000 (17:51 +1000)] 
Documentation: core-api: entry: Replace deprecated KVM entry/exit functions

The x86-specific functions kvm_guest_{enter,exit}_irqoff() were removed
and replaced by the generic guest_state_{enter,exit}_irqoff() in commit
ef9989afda73 ("kvm: add guest_state_{enter,exit}_irqoff()") and commit
b2d2af7e5df3 ("kvm/x86: rework guest entry logic").

Update the references in the entry/exit handling documentation.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicolas Saenz Julienne <nsaenz@amazon.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250723075134.105132-1-ajd@linux.ibm.com
2 weeks agodocs: fault-injection: drop reference to md-faulty
Vignesh Raman [Wed, 23 Jul 2025 10:28:32 +0000 (15:58 +0530)] 
docs: fault-injection: drop reference to md-faulty

Commit 415c7451872b ("md: Remove deprecated CONFIG_MD_FAULTY") removed
the md-faulty driver, so drop the outdated reference from the
fault-injection documentation.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250723102835.232740-1-vignesh.raman@collabora.com
3 weeks agodocs: document linked lists
Nicolas Frattaroli [Mon, 14 Jul 2025 08:14:47 +0000 (10:14 +0200)] 
docs: document linked lists

Add example-driven documentation for the kernel's generic linked list
data structure. This includes discussion of situations where linked
lists are likely inappropriate, and references to further reading.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://lore.kernel.org/r/20250714-linked-list-docs-v3-1-56c461580866@collabora.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agoscripts: kdoc: make it backward-compatible with Python 3.7
Mauro Carvalho Chehab [Fri, 11 Jul 2025 07:27:09 +0000 (09:27 +0200)] 
scripts: kdoc: make it backward-compatible with Python 3.7

There was a change at kdoc that ended breaking compatibility
with Python 3.7: str.removesuffix() was introduced on version
3.9.

Restore backward compatibility.

Reported-by: Akira Yokosawa <akiyks@gmail.com>
Closes: https://lore.kernel.org/linux-doc/57be9f77-9a94-4cde-aacb-184cae111506@gmail.com/
Fixes: 27ad33b6b349 ("kernel-doc: Fix symbol matching for dropped suffixes")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/d13058d285838ac2bc04c492e60531c013a8a919.1752218291.git.mchehab+huawei@kernel.org
3 weeks agodocs: kernel-doc: emit warnings for ancient versions of Python
Mauro Carvalho Chehab [Fri, 11 Jul 2025 07:27:08 +0000 (09:27 +0200)] 
docs: kernel-doc: emit warnings for ancient versions of Python

Kernel-doc requires at least version 3.6 to run, as it uses f-string.
Yet, Kernel build currently calls kernel-doc with -none on some places.
Better not to bail out when older versions are found.

Versions of Python prior to 3.7 do not guarantee to remember the insertion
order of dicts; since kernel-doc depends on that guarantee, running with
such older versions could result in output with reordered sections.

Check Python version when called via command line.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/7d7fa3a3aa1fafa0cc9ea29c889de4c7d377dca6.1752218291.git.mchehab+huawei@kernel.org
3 weeks agoDocumentation/rtla: Describe exit status
Costa Shulyupin [Sun, 8 Jun 2025 10:55:30 +0000 (13:55 +0300)] 
Documentation/rtla: Describe exit status

Commit 18682166f61494072d58 ("rtla: Set distinctive exit value for failed
tests") expands exit status making it useful.

Add section 'EXIT STATUS' and required SPDX-License-Identifier
to the documentation.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
[jc: fixed sphinx error caused by missing blank line]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250608105531.758809-2-costa.shul@redhat.com
3 weeks agoDocumentation/rtla: Add include common_appendix.rst
Costa Shulyupin [Sun, 8 Jun 2025 10:44:36 +0000 (13:44 +0300)] 
Documentation/rtla: Add include common_appendix.rst

Add include common_appendix.rst into
Documentation/tools/rtla/rtla-timerlat-hist.rst - the only file of
rtla-*.rst still without common_appendix.rst.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250608104437.753708-2-costa.shul@redhat.com
3 weeks agodocs: kernel: Clarify printk_ratelimit_burst reset behavior
Breno Leitao [Mon, 14 Jul 2025 12:06:27 +0000 (05:06 -0700)] 
docs: kernel: Clarify printk_ratelimit_burst reset behavior

Add clarification that the printk_ratelimit_burst window resets after
printk_ratelimit seconds have elapsed, allowing another burst of
messages to be sent. This helps users understand that the rate limiting
is not permanent but operates in periodic windows.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250714-docs_ratelimit-v1-1-51a6d9071f1a@debian.org
3 weeks agoDocumentation: ioctl-number: Don't repeat macro names
Bagas Sanjaya [Tue, 15 Jul 2025 02:42:58 +0000 (09:42 +0700)] 
Documentation: ioctl-number: Don't repeat macro names

Don't repeat mentioning macro names (_IO, _IOW, _IOR, and _IOWR) to
keep the wording effective.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250715024258.16882-3-bagasdotme@gmail.com
3 weeks agoDocumentation: ioctl-number: Shorten macros table
Bagas Sanjaya [Tue, 15 Jul 2025 02:42:57 +0000 (09:42 +0700)] 
Documentation: ioctl-number: Shorten macros table

The macros table has three columns: the second one is "an" and the
third one writes "an ioctl with ... parameters". Simplify the table
by adding heading row that indicates macro name and accepted
parameters.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250715024258.16882-2-bagasdotme@gmail.com
3 weeks agoDocumentation: ioctl-number: Correct full path to papr-physical-attestation.h
Bagas Sanjaya [Mon, 14 Jul 2025 01:57:10 +0000 (08:57 +0700)] 
Documentation: ioctl-number: Correct full path to papr-physical-attestation.h

Commit 03c9d1a5a30d93 ("Documentation: Fix description format for
powerpc RTAS ioctls") fixes Sphinx warning by chopping arch/ path
component of papr-physical-attestation.h to fit existing "Include File"
column. Now that the column has been widened just enough for that
header file, add back its arch/ path component.

Reviewed-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250714015711.14525-4-bagasdotme@gmail.com
3 weeks agoDocumentation: ioctl-number: Extend "Include File" column width
Bagas Sanjaya [Mon, 14 Jul 2025 01:57:09 +0000 (08:57 +0700)] 
Documentation: ioctl-number: Extend "Include File" column width

Extend width of "Include File" column to fit full path to
papr-physical-attestation.h in later commit.

Reviewed-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250714015711.14525-3-bagasdotme@gmail.com
3 weeks agoDocumentation: ioctl-number: Fix linuxppc-dev mailto link
Bagas Sanjaya [Mon, 14 Jul 2025 01:57:08 +0000 (08:57 +0700)] 
Documentation: ioctl-number: Fix linuxppc-dev mailto link

Spell out full Linux PPC mailing list address like other subsystem
mailing lists listed in the table.

Reviewed-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250714015711.14525-2-bagasdotme@gmail.com
3 weeks agooverlayfs.rst: fix typos
Matthias Frank [Thu, 10 Jul 2025 05:06:07 +0000 (22:06 -0700)] 
overlayfs.rst: fix typos

Grammatical fixes

Signed-off-by: Matthias Frank <frank.mt125@gmail.com>
Acked-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250710050607.2891-1-frank.mt125@gmail.com
3 weeks agoMerge branch 'kdoc-item2' into docs-mw
Jonathan Corbet [Tue, 15 Jul 2025 19:46:42 +0000 (13:46 -0600)] 
Merge branch 'kdoc-item2' into docs-mw

The kerneldoc parsing phase gathers all of the information about the
declarations of interest, then passes it through to the output phase as a
dict that is an unstructured blob of information; this organization has its
origins in the Perl version of the program.  It results in an interface
that is difficult to reason about, dozen-parameter function calls, and
other ills.

Introduce a new class (KdocItem) to carry this information between the
parser and the output modules, and, step by step, modify the system to use
this class in a more structured way.  This could be taken further by
creating a subclass of KdocItem for each declaration type (function,
struct, ...), but that is probably more structure than we need.

The result is (I hope) clearer code, the removal of a bunch of boilerplate,
and no changes to the generated output.

3 weeks agodocs: kdoc: emit a warning for ancient versions of Python
Jonathan Corbet [Thu, 10 Jul 2025 23:24:07 +0000 (17:24 -0600)] 
docs: kdoc: emit a warning for ancient versions of Python

Versions of Python prior to 3.7 do not guarantee to remember the insertion
order of dicts; since kernel-doc depends on that guarantee, running with
such older versions could result in output with reordered sections.

Python 3.9 is the minimum for the kernel as a whole, so this should not be
a problem, but put in a warning just in case somebody tries to use
something older.

Suggested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: clean up check_sections()
Jonathan Corbet [Wed, 2 Jul 2025 20:53:32 +0000 (14:53 -0600)] 
docs: kdoc: clean up check_sections()

entry.sectcheck is just a duplicate of our list of sections that is only
passed to check_sections(); its main purpose seems to be to avoid checking
the special named sections.  Rework check_sections() to not use that field
(which is then deleted), tocheck for the known sections directly, and
tighten up the logic in general.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: directly access the always-there KdocItem fields
Jonathan Corbet [Wed, 2 Jul 2025 19:55:56 +0000 (13:55 -0600)] 
docs: kdoc: directly access the always-there KdocItem fields

They are part of the interface, so use them directly.  This allows the
removal of the transitional __dict__ hack in KdocItem.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: straighten up dump_declaration()
Jonathan Corbet [Wed, 2 Jul 2025 19:34:40 +0000 (13:34 -0600)] 
docs: kdoc: straighten up dump_declaration()

Get rid of the excess "return" statements in dump_declaration(), along with
a line of never-executed dead code.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: Regularize the use of the declaration name
Jonathan Corbet [Wed, 2 Jul 2025 19:17:59 +0000 (13:17 -0600)] 
docs: kdoc: Regularize the use of the declaration name

Each declaration type passes through the name in a unique field of the
"args" blob - even though we have always just passed the name separately.
Get rid of all the weird names and just use the common version.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: Coalesce parameter-list handling
Jonathan Corbet [Wed, 2 Jul 2025 19:05:56 +0000 (13:05 -0600)] 
docs: kdoc: Coalesce parameter-list handling

Callers to output_declaration() always pass the parameter information from
self.entry; remove all of the boilerplate arguments and just get at that
information directly.  Formalize its placement in the KdocItem class.

It would be nice to get rid of parameterlist as well, but that has the
effect of reordering the output of function parameters and struct fields to
match the order in the kerneldoc comment rather than in the declaration.
One could argue about which is more correct, but the ordering has been left
unchanged for now.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: use self.entry.parameterlist directly in check_sections()
Jonathan Corbet [Wed, 2 Jul 2025 17:12:27 +0000 (11:12 -0600)] 
docs: kdoc: use self.entry.parameterlist directly in check_sections()

Callers of check_sections() join parameterlist into a single string, which
is then immediately split back into the original list.  Rather than do all
that, just use parameterlist directly in check_sections().

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: remove the "struct_actual" machinery
Jonathan Corbet [Wed, 2 Jul 2025 17:04:43 +0000 (11:04 -0600)] 
docs: kdoc: remove the "struct_actual" machinery

The code goes out of its way to create a special list of parameters in
entry.struct_actual that is just like entry.parameterlist, but with extra
junk.  The only use of that information, in check_sections(), promptly
strips all the extra junk back out.  Drop all that extra work and just use
parameterlist.

No output changes.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: Centralize handling of the item section list
Jonathan Corbet [Tue, 1 Jul 2025 22:47:59 +0000 (16:47 -0600)] 
docs: kdoc: Centralize handling of the item section list

The section list always comes directly from the under-construction entry
and is used uniformly.  Formalize section handling in the KdocItem class,
and have output_declaration() load the sections directly from the entry,
eliminating a lot of duplicated, verbose parameters.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agodocs: kdoc: drop "sectionlist"
Jonathan Corbet [Tue, 1 Jul 2025 22:21:24 +0000 (16:21 -0600)] 
docs: kdoc: drop "sectionlist"

Python dicts (as of 3.7) are guaranteed to remember the insertion order of
items, so we do not need a separate list for that purpose.  Drop the
per-entry sectionlist variable and just rely on native dict ordering.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
3 weeks agoDocumentation: core-api: entry: Fix typo "systcalls" -> "syscalls"
Andrew Donnellan [Tue, 15 Jul 2025 06:15:29 +0000 (16:15 +1000)] 
Documentation: core-api: entry: Fix typo "systcalls" -> "syscalls"

Fix a typo: "systcalls" should be "syscalls".

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250715061529.56268-1-ajd@linux.ibm.com
3 weeks agoMerge tag 'chinese-doc-6.16-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git...
Jonathan Corbet [Tue, 15 Jul 2025 19:20:32 +0000 (13:20 -0600)] 
Merge tag 'chinese-doc-6.16-rc1' of gitolite.kernel.org:pub/scm/linux/kernel/git/alexs/linux into docs-mw

Chinese translation docs for 6.16-rc1 from Alex Shi

This is the Chinese translation subtree for 6.16-rc1. It
includes few changes:
        - Updates to the process documentation
        - Added translations for network and speculation docs
        - Polished zh_CN/how-to.rst
The above patches have been tested by 'make htmldocs'

4 weeks agotracing: doc: fix "for a while" typo
Ahelenia ZiemiaÅ„ska [Thu, 3 Jul 2025 18:21:09 +0000 (20:21 +0200)] 
tracing: doc: fix "for a while" typo

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/xygdnynf7m55p7d27ovzqtdjaa7pua3bxuk5c22cnmoovaji5e@tarta.nabijaczleweli.xyz
4 weeks agoDocumentation: Remove duplicate word size in bootconfig
Sumeet Pawnikar [Sat, 5 Jul 2025 15:16:17 +0000 (20:46 +0530)] 
Documentation: Remove duplicate word size in bootconfig

Remove duplicate word size in bootconfig.rst

Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250705151618.4806-1-sumeet4linux@gmail.com
4 weeks agodocs: kdoc: pretty up dump_enum()
Jonathan Corbet [Thu, 3 Jul 2025 18:44:03 +0000 (12:44 -0600)] 
docs: kdoc: pretty up dump_enum()

Add some comments to dump_enum to help the next person who has to figure
out what it is actually doing.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250703184403.274408-8-corbet@lwn.net
4 weeks agodocs: kdoc: Remove a Python 2 comment
Jonathan Corbet [Thu, 3 Jul 2025 18:44:02 +0000 (12:44 -0600)] 
docs: kdoc: Remove a Python 2 comment

We no longer support Python 2 in the docs build chain at all, so we
certainly do not need to admonish folks to keep this file working with it.

Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250703184403.274408-7-corbet@lwn.net
4 weeks agodocs: kdoc: some tweaks to process_proto_function()
Jonathan Corbet [Thu, 3 Jul 2025 18:44:01 +0000 (12:44 -0600)] 
docs: kdoc: some tweaks to process_proto_function()

Add a set of comments to process_proto_function and reorganize the logic
slightly; no functional change.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250703184403.274408-6-corbet@lwn.net
4 weeks agodocs: kdoc: rework type prototype parsing
Jonathan Corbet [Thu, 3 Jul 2025 18:44:00 +0000 (12:44 -0600)] 
docs: kdoc: rework type prototype parsing

process_proto_type() is using a complex regex and a "while True" loop to
split a declaration into chunks and, in the end, count brackets.  Switch to
using a simpler regex to just do the split directly, and handle each chunk
as it comes.  The result is, IMO, easier to understand and reason about.

The old algorithm would occasionally elide the space between function
parameters; see struct rng_alg->generate(), foe example.  The only output
difference is to not elide that space, which is more correct.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250703184403.274408-5-corbet@lwn.net
4 weeks agodocs: kdoc: remove the brcount floor in process_proto_type()
Jonathan Corbet [Thu, 3 Jul 2025 18:43:59 +0000 (12:43 -0600)] 
docs: kdoc: remove the brcount floor in process_proto_type()

Putting the floor under brcount does not change the output in any way, just
remove it.

Change the termination test from ==0 to <=0 to prevent infinite loops in
case somebody does something truly wacko in the code.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250703184403.274408-4-corbet@lwn.net
4 weeks agodocs: kdoc: micro-optimize KernRe
Jonathan Corbet [Thu, 3 Jul 2025 18:43:58 +0000 (12:43 -0600)] 
docs: kdoc: micro-optimize KernRe

Rework _add_regex() to avoid doing the lookup twice for the (hopefully
common) cache-hit case.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250703184403.274408-3-corbet@lwn.net
4 weeks agodocs: kdoc: don't reinvent string.strip()
Jonathan Corbet [Thu, 3 Jul 2025 18:43:57 +0000 (12:43 -0600)] 
docs: kdoc: don't reinvent string.strip()

process_proto_type() and process_proto_function() reinventing the strip()
string method with a whole series of separate regexes; take all that out
and just use strip().

The previous implementation also (in process_proto_type()) removed C++
comments *after* the above dance, leaving trailing whitespace in that case;
now we do the stripping afterward.  This results in exactly one output
change: the removal of a spurious space in the definition of
BACKLIGHT_POWER_REDUCED - see
https://docs.kernel.org/gpu/backlight.html#c.backlight_properties.

I note that we are putting semicolons after #define lines that really
shouldn't be there - a task for another day.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250703184403.274408-2-corbet@lwn.net
5 weeks agoDocs/zh_CN: Translate alias.rst to Simplified Chinese
Qiu Yutan [Mon, 30 Jun 2025 10:56:30 +0000 (18:56 +0800)] 
Docs/zh_CN: Translate alias.rst to Simplified Chinese

translate the "alias.rst" into Simplified Chinese

Update to commit 735dadf894f0("docs: networking:
Convert alias.txt to rst")

Alex Shi: Modify networking/index.rst for merge issue.
Signed-off-by: Qiu Yutan <qiu.yutan@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Reviewed-by: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: Alex Shi <alexs@kernel.org>
5 weeks agoDocs/zh_CN: Translate netmem.rst to Simplified Chinese
Wang Yaxin [Sat, 5 Jul 2025 03:08:47 +0000 (11:08 +0800)] 
Docs/zh_CN: Translate netmem.rst to Simplified Chinese

translate the "netmem.rst" into Simplified Chinese.

Update the translation through commit 383faec0fd64
("net: enable driver support for netmem TX")

Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
Reviewed-by: xu xin <xu.xin16@zte.com.cn>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Alex Shi <alexs@kernel.org>
5 weeks agoDocs/zh_CN: Translate xfrm_proc.rst to Simplified Chinese
Wang Yaxin [Sat, 5 Jul 2025 03:06:49 +0000 (11:06 +0800)] 
Docs/zh_CN: Translate xfrm_proc.rst to Simplified Chinese

translate the "xfrm_proc.rst" into Simplified Chinese.

Update the translation through commit 304b44f0d5a4
("xfrm: Add dir validation to "in" data path lookup")

Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Alex Shi <alexs@kernel.org>
5 weeks agoDocs/zh_CN: Translate netif-msg.rst to Simplified Chinese
Wang Yaxin [Sat, 5 Jul 2025 03:04:24 +0000 (11:04 +0800)] 
Docs/zh_CN: Translate netif-msg.rst to Simplified Chinese

translate the "netif-msg.rst" into Simplified Chinese.

Update the translation through commit c4d5dff60f0a
("docs: networking: convert netif-msg.txt to ReST")

Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Alex Shi <alexs@kernel.org>
5 weeks agodocs/zh_CN: update git command examples in how-to.rst
Dongliang Mu [Wed, 18 Jun 2025 12:53:10 +0000 (20:53 +0800)] 
docs/zh_CN: update git command examples in how-to.rst

This patch leverages `checkout -b` to shorten branch & checkout
and fix the missing checkout.

Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn>
Acked-by: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: Alex Shi <alexs@kernel.org>
5 weeks agogitignore: allow .pylintrc to be tracked
WangYuli [Mon, 23 Jun 2025 07:19:33 +0000 (15:19 +0800)] 
gitignore: allow .pylintrc to be tracked

The .pylintrc file was introduced by commit 02df8e3b333c ("docs: add a
.pylintrc file with sys path for docs scripts") to provide Python path
configuration for documentation scripts. However, the generic ".*" rule
in .gitignore causes this tracked file to be ignored, leading to warnings
during kernel builds.

Add !.pylintrc to the exception list to explicitly allow this
configuration file to be tracked by git, consistent with other
development tool configuration files like .clang-format and .rustfmt.toml.

This resolves the build warning:
  .pylintrc: warning: ignored by one of the .gitignore files

Fixes: 02df8e3b333c ("docs: add a .pylintrc file with sys path for docs scripts")
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/1A357750FF71847E+20250623071933.311947-1-wangyuli@uniontech.com
5 weeks agoDocumentation: ext4: Move inode table short docs into its own file
Bagas Sanjaya [Fri, 20 Jun 2025 10:56:44 +0000 (17:56 +0700)] 
Documentation: ext4: Move inode table short docs into its own file

The short description of inode table is in bitmaps.rst alongside the
proper bitmpas documentation. The docs file is short enough that it fits
whole browser screen on desktop, which implies that when readers click
"Inode Table", they will essentially see bitmaps docs.

Move inode table short description.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250620105643.25141-7-bagasdotme@gmail.com
5 weeks agoDocumentation: ext4: blockgroup: Add explicit title heading
Bagas Sanjaya [Fri, 20 Jun 2025 10:56:43 +0000 (17:56 +0700)] 
Documentation: ext4: blockgroup: Add explicit title heading

Block groups documentation has three, first-level section headings.
These headings' text become toctree entries and the first one "Layout"
becomes docs title in the output, which isn't conveying the docs
contents.

Add explicit title heading and demote the rest.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250620105643.25141-6-bagasdotme@gmail.com
5 weeks agoDocumentation: ext4: atomic_writes: Demote last three sections
Bagas Sanjaya [Fri, 20 Jun 2025 10:56:42 +0000 (17:56 +0700)] 
Documentation: ext4: atomic_writes: Demote last three sections

Last three sections of atomic block writes documentation are adorned as
first-level title headings, which erroneously increase toctree entries
in overview.rst. Demote them.

Fixes: 0bf1f51e34c4 ("ext4: Add atomic block write documentation")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250620105643.25141-5-bagasdotme@gmail.com
5 weeks agoDocumentation: ext4: Reduce toctree depth
Bagas Sanjaya [Fri, 20 Jun 2025 10:56:41 +0000 (17:56 +0700)] 
Documentation: ext4: Reduce toctree depth

Reduce toctree depth from 6 to 2 to only show individual docs titles
on top-level toctree (index.rst) and to not spoil the entire hierarchy.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250620105643.25141-4-bagasdotme@gmail.com
5 weeks agoDocumentation: ext4: Convert includes into toctrees
Bagas Sanjaya [Fri, 20 Jun 2025 10:56:40 +0000 (17:56 +0700)] 
Documentation: ext4: Convert includes into toctrees

ext4 docs are organized in three master docs (overview.rst, globals.rst,
and dynamic.rst), in which these include other docs via include::
directive. These docs sturcture is better served by toctrees instead.

Convert the master docs to use toctrees.

Fixes: 0bf1f51e34c4 ("ext4: Add atomic block write documentation")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
Acked-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250620105643.25141-3-bagasdotme@gmail.com
5 weeks agodocs: kdoc: simplify the output-item passing
Jonathan Corbet [Tue, 1 Jul 2025 21:54:09 +0000 (15:54 -0600)] 
docs: kdoc: simplify the output-item passing

Since our output items contain their name, we don't need to pass it
separately.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agodocs: kdoc; Add a rudimentary class to represent output items
Jonathan Corbet [Tue, 1 Jul 2025 21:31:11 +0000 (15:31 -0600)] 
docs: kdoc; Add a rudimentary class to represent output items

This class is intended to replace the unstructured dict used to accumulate
an entry to pass to an output module.  For now, it remains unstructured,
but it works well enough that the output classes don't notice the
difference.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agodocs: kdoc: pretty up dump_enum()
Jonathan Corbet [Tue, 1 Jul 2025 19:02:54 +0000 (13:02 -0600)] 
docs: kdoc: pretty up dump_enum()

Add some comments to dump_enum to help the next person who has to figure
out what it is actually doing.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agodocs: kdoc: Remove a Python 2 comment
Jonathan Corbet [Mon, 30 Jun 2025 23:10:40 +0000 (17:10 -0600)] 
docs: kdoc: Remove a Python 2 comment

We no longer support Python 2 in the docs build chain at all, so we
certainly do not need to admonish folks to keep this file working with it.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agodocs: kdoc: some tweaks to process_proto_function()
Jonathan Corbet [Mon, 30 Jun 2025 17:38:42 +0000 (11:38 -0600)] 
docs: kdoc: some tweaks to process_proto_function()

Add a set of comments to process_proto_function and reorganize the logic
slightly; no functional change.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agodocs: kdoc: rework type prototype parsing
Jonathan Corbet [Mon, 30 Jun 2025 17:08:32 +0000 (11:08 -0600)] 
docs: kdoc: rework type prototype parsing

process_proto_type() is using a complex regex and a "while True" loop to
split a declaration into chunks and, in the end, count brackets.  Switch to
using a simpler regex to just do the split directly, and handle each chunk
as it comes.  The result is, IMO, easier to understand and reason about.

The old algorithm would occasionally elide the space between function
parameters; see struct rng_alg->generate(), foe example.  The only output
difference is to not elide that space, which is more correct.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agodocs: dma-api: clean up documentation of dma_map_sg()
Petr Tesarik [Fri, 27 Jun 2025 10:10:15 +0000 (12:10 +0200)] 
docs: dma-api: clean up documentation of dma_map_sg()

Describe in one sentence what the function does.

Do not repeat example situations when the returned number is lower than
the number of segments on input.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-9-ptesarik@suse.com
5 weeks agodocs: dma-api: update streaming DMA physical address constraints
Petr Tesarik [Fri, 27 Jun 2025 10:10:14 +0000 (12:10 +0200)] 
docs: dma-api: update streaming DMA physical address constraints

Add an introductory paragraph to Part Id - Streaming DMA mappings and move
the explanation of address constraints there, because it applies to all map
functions.

Clarify that streaming DMA can be used with memory which does not meet the
addressing constraints of a device, but it may fail in that case.

Make a note about SWIOTLB and link to the detailed description of it.

Do not mention platform-dependent allocation flags. The note may mislead
device driver authors into thinking that they should poke into and try to
second-guess the DMA API implementation. They definitely shouldn't.

Remove the claim that platforms with an IOMMU may not require physically
contiguous buffers. The current implementation explicitly rejects vmalloc
addresses, regardless of IOMMU.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-8-ptesarik@suse.com
5 weeks agodocs: dma-api: clarify DMA addressing limitations
Petr Tesarik [Fri, 27 Jun 2025 10:10:13 +0000 (12:10 +0200)] 
docs: dma-api: clarify DMA addressing limitations

Move the description of DMA mask from the documentation of dma_map_single()
to Part Ic - DMA addressing limitations and improve the wording.

Explain when a mask setting function may fail, and do not repeat this
explanation for each individual function.

Clarify which device parameters are updated by each mask setting function.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-7-ptesarik@suse.com
5 weeks agodocs: dma-api: remove duplicate description of the DMA pool API
Petr Tesarik [Fri, 27 Jun 2025 10:10:12 +0000 (12:10 +0200)] 
docs: dma-api: remove duplicate description of the DMA pool API

Move the DMA pool API documentation from Memory Management APIs to
dma-api.rst, replacing the outdated duplicate description there.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-6-ptesarik@suse.com
5 weeks agodocs: dma-api: add a kernel-doc comment for dma_pool_zalloc()
Petr Tesarik [Fri, 27 Jun 2025 10:10:11 +0000 (12:10 +0200)] 
docs: dma-api: add a kernel-doc comment for dma_pool_zalloc()

Document the dma_pool_zalloc() wrapper.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
[jc: fixed up dma_pool_alloc() reference in dmapool.h]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-5-ptesarik@suse.com
5 weeks agodocs: dma-api: remove remnants of PCI DMA API
Petr Tesarik [Fri, 27 Jun 2025 10:10:10 +0000 (12:10 +0200)] 
docs: dma-api: remove remnants of PCI DMA API

The wording sometimes suggests there are multiple functions for an
operation. This was in fact the case before PCI DMA API was removed, but
since there is only one API now, the documentation has become confusing.

To improve readability:

* Remove implicit references to the PCI DMA API (plurals, use of "both",
  etc.)

* Where possible, refer to an actual function rather than a more generic
  description of the operation.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-4-ptesarik@suse.com
5 weeks agodocs: dma-api: replace consistent with coherent
Petr Tesarik [Fri, 27 Jun 2025 10:10:09 +0000 (12:10 +0200)] 
docs: dma-api: replace consistent with coherent

For consistency, always use the term "coherent" when talking about memory
that is not subject to CPU caching effects. The term "consistent" is a
relic of a long-removed PCI DMA API (pci_alloc_consistent() and
pci_free_consistent() functions).

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-3-ptesarik@suse.com
5 weeks agodocs: dma-api: use "DMA API" consistently throughout the document
Petr Tesarik [Fri, 27 Jun 2025 10:10:08 +0000 (12:10 +0200)] 
docs: dma-api: use "DMA API" consistently throughout the document

Make sure that all occurrences are spelled "DMA API" (all uppercase, no
hyphen, no underscore).

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-2-ptesarik@suse.com
5 weeks agoMAINTAINERS: replace git protocol for github
Xose Vazquez Perez [Wed, 25 Jun 2025 15:02:31 +0000 (17:02 +0200)] 
MAINTAINERS: replace git protocol for github

It was removed time ago:
https://github.blog/changelog/2022-03-15-removed-unencrypted-git-protocol-and-certain-ssh-keys/

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: DOC ML <linux-doc@vger.kernel.org>
Cc: KERNEL ML <linux-kernel@vger.kernel.org>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250625150231.241687-1-xose.vazquez@gmail.com
5 weeks agodocs: ABI: make the KernelVersion field optional
Alison Schofield [Thu, 26 Jun 2025 02:40:58 +0000 (19:40 -0700)] 
docs: ABI: make the KernelVersion field optional

The KernelVersion field has limited practical value. Git history
provides more accurate tracking of when features were introduced
and target kernel versions often change during development and
merge.

Label it optional.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250626024101.792073-1-alison.schofield@intel.com
5 weeks agooverlayfs.rst: Fix inode table
Richard Weinberger [Sat, 28 Jun 2025 08:32:05 +0000 (10:32 +0200)] 
overlayfs.rst: Fix inode table

The HTML output seems to be correct, but when reading the raw rst file
it's annoying.
So use "|" for table the border.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250628083205.1066472-1-richard@nod.at
5 weeks agodocs: kdoc: split the processing of the two remaining inline states
Jonathan Corbet [Fri, 27 Jun 2025 18:40:00 +0000 (12:40 -0600)] 
docs: kdoc: split the processing of the two remaining inline states

Now that "inline_*" are just ordinary parser states, split them into two
separate functions, getting rid of some nested conditional logic.

The original process_inline() would simply ignore lines that didn't match
any of the regexes (those lacking the initial " * " marker).  I have
preserved that behavior, but we should perhaps emit a warning instead.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-9-corbet@lwn.net
5 weeks agodocs: kdoc: remove the inline states-within-a-state
Jonathan Corbet [Fri, 27 Jun 2025 18:39:59 +0000 (12:39 -0600)] 
docs: kdoc: remove the inline states-within-a-state

The processing of inline kerneldoc comments is a state like the rest, but
it was implemented as a set of separate substates.  Just remove the
substate logic and make the inline states normal ones like the rest.

INLINE_ERROR was never actually used for anything, so just take it out.

No changes to the generated output.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-8-corbet@lwn.net
5 weeks agodocs: kdoc: remove the INLINE_END state
Jonathan Corbet [Fri, 27 Jun 2025 18:39:58 +0000 (12:39 -0600)] 
docs: kdoc: remove the INLINE_END state

It is never used, so just get rid of it.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-7-corbet@lwn.net
5 weeks agodocs: kdoc: rework process_export() slightly
Jonathan Corbet [Fri, 27 Jun 2025 18:39:57 +0000 (12:39 -0600)] 
docs: kdoc: rework process_export() slightly

Reorganize process_export() to eliminate duplicated code, don't look for
exports in states where we don't expect them, and don't bother with normal
state-machine processing if an export declaration has been found.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-6-corbet@lwn.net
5 weeks agodocs: kdoc: remove KernelEntry::function
Jonathan Corbet [Fri, 27 Jun 2025 18:39:56 +0000 (12:39 -0600)] 
docs: kdoc: remove KernelEntry::function

This member is unused, to take it out.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-5-corbet@lwn.net
5 weeks agodocs: kdoc: remove a bit of dead code
Jonathan Corbet [Fri, 27 Jun 2025 18:39:55 +0000 (12:39 -0600)] 
docs: kdoc: remove a bit of dead code

The type_param regex matches "@..." just fine, so the special-case branch
for that in dump_section() is never executed.  Just remove it.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-4-corbet@lwn.net
5 weeks agodocs: kdoc: Move content handling into KernelEntry
Jonathan Corbet [Fri, 27 Jun 2025 18:39:54 +0000 (12:39 -0600)] 
docs: kdoc: Move content handling into KernelEntry

Rather than having other code mucking around with this bit of internal
state, encapsulate it internally.  Accumulate the description as a list of
strings, joining them at the end, which is a more efficient way of building
the text.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-3-corbet@lwn.net
5 weeks agodocs: kdoc: remove KernelEntry::in_doc_sect
Jonathan Corbet [Fri, 27 Jun 2025 18:39:53 +0000 (12:39 -0600)] 
docs: kdoc: remove KernelEntry::in_doc_sect

This field is not used for anything, just get rid of it.

Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627184000.132291-2-corbet@lwn.net
5 weeks agodocs: kdoc: remove the brcount floor in process_proto_type()
Jonathan Corbet [Mon, 30 Jun 2025 16:03:28 +0000 (10:03 -0600)] 
docs: kdoc: remove the brcount floor in process_proto_type()

Putting the floor under brcount does not change the output in any way, just
remove it.

Change the termination test from ==0 to <=0 to prevent infinite loops in
case somebody does something truly wacko in the code.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agodocs: kdoc: micro-optimize KernRe
Jonathan Corbet [Mon, 30 Jun 2025 15:33:23 +0000 (09:33 -0600)] 
docs: kdoc: micro-optimize KernRe

Switch KernRe::add_regex() to a try..except block to avoid looking up each
regex twice.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: don't reinvent string.strip()
Jonathan Corbet [Fri, 27 Jun 2025 19:08:20 +0000 (13:08 -0600)] 
docs: kdoc: don't reinvent string.strip()

process_proto_type() and process_proto_function() reinventing the strip()
string method with a whole series of separate regexes; take all that out
and just use strip().

The previous implementation also (in process_proto_type()) removed C++
comments *after* the above dance, leaving trailing whitespace in that case;
now we do the stripping afterward.  This results in exactly one output
change: the removal of a spurious space in the definition of
BACKLIGHT_POWER_REDUCED - see
https://docs.kernel.org/gpu/backlight.html#c.backlight_properties.

I note that we are putting semicolons after #define lines that really
shouldn't be there - a task for another day.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: split the processing of the two remaining inline states
Jonathan Corbet [Fri, 27 Jun 2025 18:23:05 +0000 (12:23 -0600)] 
docs: kdoc: split the processing of the two remaining inline states

Now that "inline_*" are just ordinary parser states, split them into two
separate functions, getting rid of some nested conditional logic.

The original process_inline() would simply ignore lines that didn't match
any of the regexes (those lacking the initial " * " marker).  I have
preserved that behavior, but we should perhaps emit a warning instead.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: remove the inline states-within-a-state
Jonathan Corbet [Fri, 27 Jun 2025 17:33:18 +0000 (11:33 -0600)] 
docs: kdoc: remove the inline states-within-a-state

The processing of inline kerneldoc comments is a state like the rest, but
it was implemented as a set of separate substates.  Just remove the
substate logic and make the inline states normal ones like the rest.

INLINE_ERROR was never actually used for anything, so just take it out.

No changes to the generated output.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: remove the INLINE_END state
Jonathan Corbet [Thu, 26 Jun 2025 19:38:05 +0000 (13:38 -0600)] 
docs: kdoc: remove the INLINE_END state

It is never used, so just get rid of it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: rework process_export() slightly
Jonathan Corbet [Wed, 25 Jun 2025 23:19:40 +0000 (17:19 -0600)] 
docs: kdoc: rework process_export() slightly

Reorganize process_export() to eliminate duplicated code, don't look for
exports in states where we don't expect them, and don't bother with normal
state-machine processing if an export declaration has been found.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: remove KernelEntry::function
Jonathan Corbet [Wed, 25 Jun 2025 22:58:55 +0000 (16:58 -0600)] 
docs: kdoc: remove KernelEntry::function

This member is unused, to take it out.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: remove a bit of dead code
Jonathan Corbet [Wed, 25 Jun 2025 21:43:37 +0000 (15:43 -0600)] 
docs: kdoc: remove a bit of dead code

The type_param regex matches "@..." just fine, so the special-case branch
for that in dump_section() is never executed.  Just remove it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: Move content handling into KernelEntry
Jonathan Corbet [Wed, 25 Jun 2025 20:51:11 +0000 (14:51 -0600)] 
docs: kdoc: Move content handling into KernelEntry

Rather than having other code mucking around with this bit of internal
state, encapsulate it internally.  Accumulate the description as a list of
strings, joining them at the end, which is a more efficient way of building
the text.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodocs: kdoc: remove KernelEntry::in_doc_sect
Jonathan Corbet [Wed, 25 Jun 2025 20:08:40 +0000 (14:08 -0600)] 
docs: kdoc: remove KernelEntry::in_doc_sect

This field is not used for anything, just get rid of it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
6 weeks agodoc: Remove misleading reference to brd in dax.rst
Daniel Palmer [Mon, 9 Jun 2025 23:37:38 +0000 (08:37 +0900)] 
doc: Remove misleading reference to brd in dax.rst

brd hasn't supported DAX for a long time but dax.rst
still suggests it as an example of how to write a DAX
supporting block driver.

Remove the reference, confuse less people.

Fixes: 7a862fbbdec6 ("brd: remove dax support")
Signed-off-by: Daniel Palmer <daniel.palmer@sony.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250610-fixdasrstbrd20250610-v1-1-4abe3b7f381a@sony.com
6 weeks agodocs: sphinx: add missing SPDX tags
Mauro Carvalho Chehab [Sun, 22 Jun 2025 09:39:53 +0000 (11:39 +0200)] 
docs: sphinx: add missing SPDX tags

Several Sphinx extensions and tools are missing SPDX tags.
Add 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/1a62226c5fe524eb87bdb80b33bc7ec880a68880.1750585188.git.mchehab+huawei@kernel.org
6 weeks agodocs: conf.py: several coding style fixes
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:43 +0000 (08:02 +0200)] 
docs: conf.py: several coding style fixes

conf.py is missing a SPDX header and doesn't really have
a proper python coding style. It also has an obsolete
commented LaTeX syntax that doesn't work anymore.

Clean it up a little bit with some help from autolints
and manual adjustments.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/063c106d96e86ca30c3266f7819f30b7247881ed.1750571906.git.mchehab+huawei@kernel.org
6 weeks agodocs: sphinx: add a file with the requirements for lowest version
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:42 +0000 (08:02 +0200)] 
docs: sphinx: add a file with the requirements for lowest version

Those days, it is hard to install a virtual env that would
build docs with Sphinx 3.4.3, as even python 3.13 is not
compatible anymore with it.

/usr/bin/python3.9 -m venv sphinx_3.4.3
. sphinx_3.4.3/bin/activate
pip install -r Documentation/sphinx/min_requirements.txt

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/e38a44ee64ebfa37eac5f64e47af51c7ac051d5a.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: test_doc_build.py: regroup and rename arguments
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:41 +0000 (08:02 +0200)] 
scripts: test_doc_build.py: regroup and rename arguments

The script now have lots or arguments. Better organize and
name them, for it to be a little bit more intuitive.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/acf5e1db38ca6a713c44ceca9db5cdd7d3079c92.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: fix release detection for Fedora
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:40 +0000 (08:02 +0200)] 
scripts: sphinx-pre-install: fix release detection for Fedora

Fedora distros are now identified as:

Fedora Linux 42

Fix the way script detects 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/c2a34860bd986cc5f81fc25554ed91629736e995.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: sphinx-pre-install: properly handle SPHINXBUILD
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:39 +0000 (08:02 +0200)] 
scripts: sphinx-pre-install: properly handle SPHINXBUILD

Currently, the script ignores SPHINXBUILD, making it useless.
As we're about to use on another script, fix support for 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/b0217df871a5e563646d386327bdd7a393c58ac2.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: test_doc_build.py: make the script smarter
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:38 +0000 (08:02 +0200)] 
scripts: test_doc_build.py: make the script smarter

Most of the time, testing the full range of supported Sphinx
version is a waste of time and resources. Instead, the best is
to focus at the versions that are actually shipped by major
distros.

For it to work properly, we need to adjust the requirements for
them to start from first patch for each distro after the
minimal supported one. The requirements were re-adjusted to
avoid build breakages related to version incompatibilities.
Such builds were tested with:

./scripts/test_doc_build.py -m -a "SPHINXOPTS=-j8" "SPHINXDIRS=networking netlink/specs" --full

Change the logic to pick by default only such versions, adding
another parameter to do a comprehensive test.

While here, improve the script documentation to make it easier
to be used.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/a2b9b7775a185766643ea4b82b558de25b61d6c7.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: test_doc_build.py: improve cmd.log logic
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:37 +0000 (08:02 +0200)] 
scripts: test_doc_build.py: improve cmd.log logic

Simplify the logic which handles with new lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/2436f37ab7945673f26bcfc94c10e6e76b93c2d8.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: test_doc_build.py: improve dependency list
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:36 +0000 (08:02 +0200)] 
scripts: test_doc_build.py: improve dependency list

Change the dependency list to ensure that:
- all docutils versions are covered;
- provide an explanation about the dependencies;
- set a better minimal requirement for 3.4.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/433aeefb4ac9edbd62494334ac07bc1307387d40.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: test_doc_build.py: better adjust to python version
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:35 +0000 (08:02 +0200)] 
scripts: test_doc_build.py: better adjust to python version

Very old versions of Sphinx require older versions of python.
The original script assumes that a python3.9 exec exists,
but this may not be the case.

Relax python requirements.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/32cb41c543293bbbab5fcb15f8a0aefac040e3a9.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: test_doc_build.py: better control its output
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:34 +0000 (08:02 +0200)] 
scripts: test_doc_build.py: better control its output

Now that asyncio is supported, allow userspace to adjust
verbosity level and direct the script output to a file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/76c3a64a87a7493ae607d5c7784b3b829affcaf0.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: test_doc_build.py: make capture assynchronous
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:33 +0000 (08:02 +0200)] 
scripts: test_doc_build.py: make capture assynchronous

Prepare the tool to allow writing the output into log files.
For such purpose, receive stdin/stdout messages asynchronously.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/9b0a60b5047137b5ba764701268da992767b128c.1750571906.git.mchehab+huawei@kernel.org
6 weeks agoscripts: scripts/test_doc_build.py: add script to test doc build
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:32 +0000 (08:02 +0200)] 
scripts: scripts/test_doc_build.py: add script to test doc build

Testing Sphinx backward-compatibility is hard, as per version
minimal Python dependency requirements can be a nightmare.

Add a script to help automate such checks.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/93faf6c35ec865566246ca094868a8e6d85dde39.1750571906.git.mchehab+huawei@kernel.org
6 weeks agodocs: Makefile: disable check rules on make cleandocs
Mauro Carvalho Chehab [Sun, 22 Jun 2025 06:02:31 +0000 (08:02 +0200)] 
docs: Makefile: disable check rules on make cleandocs

It doesn't make sense to check for missing ABI and documents
when cleaning the tree.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/8386afcee494c9e81d051c83235150104e3a2949.1750571906.git.mchehab+huawei@kernel.org