Skip to contentSkip to conversation

Internalize www.kernel.org/doc cross-references

PATCH In review Bagas Sanjaya 3 participants 16 messages Sep 10, 2025 – Sep 11, 2025

Subsystems (26)
lore
Share & tools
lore
#0 lore raw

v2 cover Internalize www.kernel.org/doc cross-references

Cross-references to other docs (so-called internal links) are typically done following Documentation/doc-guide/sphinx.rst: either simply write the target docs (preferred) or use :doc: or :ref: reST directives (for use-cases like having anchor text or cross-referencing sections). In some places, however, links to https://www.kernel.org/doc are used instead (outgoing, external links), owing inconsistency as these requires Internet connection only to see docs that otherwise can be accessed locally (after building with ``make htmldocs``).

Convert such external links to internal links, while keeping the original anchor texts using :doc: directive. Note that this does not cover docs.kernel.org links nor touching Documentation/tools (as docs containing external links are in manpages).

This series is based on docs-next tree. Maintainers can feel free to apply any of patches in this series to their own tree.

Changes since v1 [1]:

* Apply review tags
* Drop patch [12/14] as it has been applied to sound tree

[1]: https://lore.kernel.org/linux-doc/[email protected]/

Bagas Sanjaya (13):
Documentation: hw-vuln: l1tf: Convert kernel docs external links
Documentation: damon: reclaim: Convert "Free Page Reporting" citation
link
Documentation: perf-security: Convert security credentials
bibliography link
Documentation: amd-pstate: Use internal link to kselftest
Documentation: blk-mq: Convert block layer docs external links
Documentation: bpf: Convert external kernel docs link
Documentation: kasan: Use internal link to kunit
Documentation: gpu: Use internal link to kunit
Documentation: filesystems: Fix stale reference to device-mapper docs
Documentation: smb: smbdirect: Convert KSMBD docs link
Documentation: net: Convert external kernel networking docs
nitro_enclaves: Use internal cross-reference for kernel docs links
Documentation: checkpatch: Convert kernel docs references

 Documentation/admin-guide/hw-vuln/l1tf.rst    |   9 +-
 .../admin-guide/mm/damon/reclaim.rst          |   2 +-
 Documentation/admin-guide/perf-security.rst   |   2 +-
 Documentation/admin-guide/pm/amd-pstate.rst   |   3 +-
 Documentation/block/blk-mq.rst                |  23 ++--
 Documentation/bpf/bpf_iterators.rst           |   3 +-
 Documentation/bpf/map_xskmap.rst              |   5 +-
 Documentation/dev-tools/checkpatch.rst        | 121 ++++++++++++------
 Documentation/dev-tools/kasan.rst             |   6 +-
 .../bindings/submitting-patches.rst           |   2 +
 .../driver-api/driver-model/device.rst        |   2 +
 Documentation/filesystems/fsverity.rst        |  11 +-
 Documentation/filesystems/smb/smbdirect.rst   |   4 +-
 Documentation/filesystems/sysfs.rst           |   2 +
 .../filesystems/ubifs-authentication.rst      |   4 +-
 Documentation/gpu/todo.rst                    |   6 +-
 Documentation/kbuild/reproducible-builds.rst  |   2 +
 Documentation/locking/lockdep-design.rst      |   2 +
 .../can/ctu/ctucanfd-driver.rst               |   3 +-
 .../device_drivers/ethernet/amazon/ena.rst    |   4 +-
 Documentation/networking/ethtool-netlink.rst  |   3 +-
 Documentation/networking/snmp_counter.rst     |  12 +-
 Documentation/process/coding-style.rst        |  15 +++
 Documentation/process/deprecated.rst          |   4 +
 Documentation/process/submitting-patches.rst  |   4 +
 Documentation/virt/ne_overview.rst            |  10 +-
 26 files changed, 161 insertions(+), 103 deletions(-)

base-commit: f44a29784f685804d9970cfb0d3439c9e30981d7

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

PATCH v2 1/13 Documentation: hw-vuln: l1tf: Convert kernel docs external links

Convert external links to kernel docs to use internal cross-references.

---
 Documentation/admin-guide/hw-vuln/l1tf.rst | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
Documentation/admin-guide/hw-vuln/l1tf.rst +3 -6
index 3eeeb488d95527..60bfabbf0b6e2d 100644
@@ -239,9 +239,8 @@ Guest mitigation mechanisms
    scenarios.
 
    For further information about confining guests to a single or to a group
-   of cores consult the cpusets documentation:
-
-   https://www.kernel.org/doc/Documentation/admin-guide/cgroup-v1/cpusets.rst
+   of cores consult the :doc:`cgroup cpusets documentation
+   <../cgroup-v1/cpusets>`.
 
 .. _interrupt_isolation:
 
@@ -266,9 +265,7 @@ Guest mitigation mechanisms
 
    Interrupt affinity can be controlled by the administrator via the
    /proc/irq/$NR/smp_affinity[_list] files. Limited documentation is
-   available at:
-
-   https://www.kernel.org/doc/Documentation/core-api/irq/irq-affinity.rst
+   available at Documentation/core-api/irq/irq-affinity.rst.
 
 .. _smt_control:
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#2 lore raw

PATCH v2 2/13 Documentation: damon: reclaim: Convert "Free Page Reporting" citation link

In reply to Bagas Sanjaya

Use internal cross-reference for the citation link to Free Page Reporting docs.

---
 Documentation/admin-guide/mm/damon/reclaim.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/admin-guide/mm/damon/reclaim.rst +1 -1
index af05ae6170184f..92bb7cf1b5587a 100644
@@ -298,4 +298,4 @@ granularity reclamation. ::
 
 .. [1] https://research.google/pubs/pub48551/
 .. [2] https://lwn.net/Articles/787611/
-.. [3] https://www.kernel.org/doc/html/latest/mm/free_page_reporting.html
+.. [3] Documentation/mm/free_page_reporting.rst
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#3 lore raw

PATCH v2 3/13 Documentation: perf-security: Convert security credentials bibliography link

In reply to Bagas Sanjaya

Use internal cross-reference for bibliography link to security credentials docs.

---
 Documentation/admin-guide/perf-security.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/admin-guide/perf-security.rst +1 -1
index 34aa334320cad3..ec308e00771427 100644
@@ -311,7 +311,7 @@ Bibliography
 .. [2] `<http://man7.org/linux/man-pages/man2/perf_event_open.2.html>`_
 .. [3] `<http://web.eece.maine.edu/~vweaver/projects/perf_events/>`_
 .. [4] `<https://perf.wiki.kernel.org/index.php/Main_Page>`_
-.. [5] `<https://www.kernel.org/doc/html/latest/security/credentials.html>`_
+.. [5] Documentation/security/credentials.rst
 .. [6] `<http://man7.org/linux/man-pages/man7/capabilities.7.html>`_
 .. [7] `<http://man7.org/linux/man-pages/man2/ptrace.2.html>`_
 .. [8] `<https://en.wikipedia.org/wiki/Hardware_performance_counter>`_
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#4 lore raw

PATCH v2 4/13 Documentation: amd-pstate: Use internal link to kselftest

In reply to Bagas Sanjaya

Convert kselftest docs link to internal cross-reference.

---
 Documentation/admin-guide/pm/amd-pstate.rst | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Documentation/admin-guide/pm/amd-pstate.rst +1 -2
index e1771f2225d5f0..37082f2493a7c1 100644
@@ -798,5 +798,4 @@ Reference
 .. [3] Processor Programming Reference (PPR) for AMD Family 19h Model 51h, Revision A1 Processors
        https://www.amd.com/system/files/TechDocs/56569-A1-PUB.zip
 
-.. [4] Linux Kernel Selftests,
-       https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
+.. [4] Documentation/dev-tools/kselftest.rst
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#5 lore raw

PATCH v2 5/13 Documentation: blk-mq: Convert block layer docs external links

In reply to Bagas Sanjaya

Convert external links to block layer docs to use internal linking.

---
 Documentation/block/blk-mq.rst | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
Documentation/block/blk-mq.rst +11 -12
index fc06761b6ea906..4d511feda39cfd 100644
@@ -87,17 +87,16 @@ IO Schedulers
 There are several schedulers implemented by the block layer, each one following
 a heuristic to improve the IO performance. They are "pluggable" (as in plug
 and play), in the sense of they can be selected at run time using sysfs. You
-can read more about Linux's IO schedulers `here
-<https://www.kernel.org/doc/html/latest/block/index.html>`_. The scheduling
-happens only between requests in the same queue, so it is not possible to merge
-requests from different queues, otherwise there would be cache trashing and a
-need to have a lock for each queue. After the scheduling, the requests are
-eligible to be sent to the hardware. One of the possible schedulers to be
-selected is the NONE scheduler, the most straightforward one. It will just
-place requests on whatever software queue the process is running on, without
-any reordering. When the device starts processing requests in the hardware
-queue (a.k.a. run the hardware queue), the software queues mapped to that
-hardware queue will be drained in sequence according to their mapping.
+can read more about Linux's IO schedulers at Documentation/block/index.rst.
+The scheduling happens only between requests in the same queue, so it is not
+possible to merge requests from different queues, otherwise there would be
+cache trashing and a need to have a lock for each queue. After the scheduling,
+the requests are eligible to be sent to the hardware. One of the possible
+schedulers to be selected is the NONE scheduler, the most straightforward one.
+It will just place requests on whatever software queue the process is running
+on, without any reordering. When the device starts processing requests in the
+hardware queue (a.k.a. run the hardware queue), the software queues mapped to
+that hardware queue will be drained in sequence according to their mapping.
 
 Hardware dispatch queues
 ~~~~~~~~~~~~~~~~~~~~~~~~
@@ -143,7 +142,7 @@ Further reading
 
 - `NOOP scheduler <https://en.wikipedia.org/wiki/Noop_scheduler>`_
 
-- `Null block device driver <https://www.kernel.org/doc/html/latest/block/null_blk.html>`_
+- Documentation/block/null_blk.rst
 
 Source code documentation
 =========================
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#6 lore raw

PATCH v2 6/13 Documentation: bpf: Convert external kernel docs link

In reply to Bagas Sanjaya

Convert links to other docs pages that use external links into internal cross-references.

---
 Documentation/bpf/bpf_iterators.rst | 3 +--
 Documentation/bpf/map_xskmap.rst    | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)
Documentation/bpf/bpf_iterators.rst +1 -2
index 189e3ec1c6c8e0..c8e68268fb3e76 100644
@@ -123,8 +123,7 @@ which often takes time to publish upstream and release. The same is true for pop
 tools like `ss <https://man7.org/linux/man-pages/man8/ss.8.html>`_ where any
 additional information needs a kernel patch.
 
-To solve this problem, the `drgn
-<https://www.kernel.org/doc/html/latest/bpf/drgn.html>`_ tool is often used to
+To solve this problem, the :doc:`drgn <drgn>` tool is often used to
 dig out the kernel data with no kernel change. However, the main drawback for
 drgn is performance, as it cannot do pointer tracing inside the kernel. In
 addition, drgn cannot validate a pointer value and may read invalid data if the
Documentation/bpf/map_xskmap.rst +2 -3
index dc143edd923393..58562e37c16a01 100644
@@ -10,7 +10,7 @@ BPF_MAP_TYPE_XSKMAP
 
 The ``BPF_MAP_TYPE_XSKMAP`` is used as a backend map for XDP BPF helper
 call ``bpf_redirect_map()`` and ``XDP_REDIRECT`` action, like 'devmap' and 'cpumap'.
-This map type redirects raw XDP frames to `AF_XDP`_ sockets (XSKs), a new type of
+This map type redirects raw XDP frames to AF_XDP sockets (XSKs), a new type of
 address family in the kernel that allows redirection of frames from a driver to
 user space without having to traverse the full network stack. An AF_XDP socket
 binds to a single netdev queue. A mapping of XSKs to queues is shown below:
@@ -181,12 +181,11 @@ AF_XDP-forwarding programs in the `bpf-examples`_ directory in the `libxdp`_ rep
 For a detailed explanation of the AF_XDP interface please see:
 
 - `libxdp-readme`_.
-- `AF_XDP`_ kernel documentation.
+- Documentation/networking/af_xdp.rst.
 
 .. note::
     The most comprehensive resource for using XSKMAPs and AF_XDP is `libxdp`_.
 
 .. _libxdp: https://github.com/xdp-project/xdp-tools/tree/master/lib/libxdp
-.. _AF_XDP: https://www.kernel.org/doc/html/latest/networking/af_xdp.html
 .. _bpf-examples: https://github.com/xdp-project/bpf-examples
 .. _libxdp-readme: https://github.com/xdp-project/xdp-tools/tree/master/lib/libxdp#using-af_xdp-sockets
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#7 lore raw

PATCH v2 7/13 Documentation: kasan: Use internal link to kunit

In reply to Bagas Sanjaya

Use internal linking to KUnit documentation.

---
 Documentation/dev-tools/kasan.rst | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Documentation/dev-tools/kasan.rst +2 -4
index 0a1418ab72fdfc..c0896d55c97af8 100644
@@ -562,7 +562,5 @@ There are a few ways to run the KASAN tests.
    With ``CONFIG_KUNIT`` and ``CONFIG_KASAN_KUNIT_TEST`` built-in, it is also
    possible to use ``kunit_tool`` to see the results of KUnit tests in a more
    readable way. This will not print the KASAN reports of the tests that passed.
-   See `KUnit documentation <https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html>`_
-   for more up-to-date information on ``kunit_tool``.
-
-.. _KUnit: https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html
+   See :doc:`KUnit documentation <kunit/index>` for more up-to-date information
+   on ``kunit_tool``.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#9 lore raw

PATCH v2 8/13 Documentation: gpu: Use internal link to kunit

In reply to Bagas Sanjaya

Use internal linking to kunit documentation.

---
 Documentation/gpu/todo.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Documentation/gpu/todo.rst +3 -3
index be8637da3fe950..efe9393f260ae2 100644
@@ -655,9 +655,9 @@ Better Testing
 Add unit tests using the Kernel Unit Testing (KUnit) framework
 --------------------------------------------------------------
 
-The `KUnit <https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html>`_
-provides a common framework for unit tests within the Linux kernel. Having a
-test suite would allow to identify regressions earlier.
+The :doc:`KUnit </dev-tools/kunit/index>` provides a common framework for unit
+tests within the Linux kernel. Having a test suite would allow to identify
+regressions earlier.
 
 A good candidate for the first unit tests are the format-conversion helpers in
 ``drm_format_helper.c``.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#10 lore raw

PATCH v2 9/13 Documentation: filesystems: Fix stale reference to device-mapper docs

In reply to Bagas Sanjaya

Commit 6cf2a73cb2bc42 ("docs: device-mapper: move it to the admin-guide") moves device mapper docs to Documentation/admin-guide, but left references (which happen to be external ones) behind, hence 404 when clicking them.

Fix the references while also converting them to internal ones.

---
 Documentation/filesystems/fsverity.rst             | 11 +++++------
 Documentation/filesystems/ubifs-authentication.rst |  4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)
Documentation/filesystems/fsverity.rst +5 -6
index 412cf11e329852..54378a3926de7b 100644
@@ -15,12 +15,11 @@ of read-only files.  Currently, it is supported by the ext4, f2fs, and
 btrfs filesystems.  Like fscrypt, not too much filesystem-specific
 code is needed to support fs-verity.
 
-fs-verity is similar to `dm-verity
-<https://www.kernel.org/doc/Documentation/admin-guide/device-mapper/verity.rst>`_
-but works on files rather than block devices.  On regular files on
-filesystems supporting fs-verity, userspace can execute an ioctl that
-causes the filesystem to build a Merkle tree for the file and persist
-it to a filesystem-specific location associated with the file.
+fs-verity is similar to :doc:`dm-verity
+</admin-guide/device-mapper/verity>` but works on files rather than block
+devices.  On regular files on filesystems supporting fs-verity, userspace can
+execute an ioctl that causes the filesystem to build a Merkle tree for the file
+and persist it to a filesystem-specific location associated with the file.
 
 After this, the file is made readonly, and all reads from the file are
 automatically verified against the file's Merkle tree.  Reads of any
Documentation/filesystems/ubifs-authentication.rst +2 -2
index 106bb9c056f611..9fcad59820915d 100644
@@ -439,9 +439,9 @@ References
 
 [DMC-CBC-ATTACK]     https://www.jakoblell.com/blog/2013/12/22/practical-malleability-attack-against-cbc-encrypted-luks-partitions/
 
-[DM-INTEGRITY]       https://www.kernel.org/doc/Documentation/device-mapper/dm-integrity.rst
+[DM-INTEGRITY]       Documentation/admin-guide/device-mapper/dm-integrity.rst
 
-[DM-VERITY]          https://www.kernel.org/doc/Documentation/device-mapper/verity.rst
+[DM-VERITY]          Documentation/admin-guide/device-mapper/verity.rst
 
 [FSCRYPT-POLICY2]    https://lore.kernel.org/r/[email protected]/
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#11 lore raw

PATCH v2 10/13 Documentation: smb: smbdirect: Convert KSMBD docs link

In reply to Bagas Sanjaya

Convert KSMBD docs link to internal link.

---
 Documentation/filesystems/smb/smbdirect.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/filesystems/smb/smbdirect.rst +2 -2
index ca6927c0b2c084..6258de919511fa 100644
@@ -76,8 +76,8 @@ Installation
 Setup and Usage
 ================
 
-- Set up and start a KSMBD server as described in the `KSMBD documentation
-  <https://www.kernel.org/doc/Documentation/filesystems/smb/ksmbd.rst>`_.
+- Set up and start a KSMBD server as described in the :doc:`KSMBD documentation
+  <ksmbd>`.
   Also add the "server multi channel support = yes" parameter to ksmbd.conf.
 
 - On the client, mount the share with `rdma` mount option to use SMB Direct
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Reviewed-by on v2 10/13
#12 lore raw

Re: [EXTERNAL] [PATCH v2 10/13] Documentation: smb: smbdirect: Convert KSMBD docs link

Thanks
Meetakshi

________________________________________
From: Bagas Sanjaya <[email protected]>
Sent: 10 September 2025 08:13
To: Linux Kernel Mailing List <[email protected]>; Linux Documentation <[email protected]>; Linux DAMON <[email protected]>; Linux Memory Management List <[email protected]>; Linux Power Management <[email protected]>; Linux Block Devices <[email protected]>; Linux BPF <[email protected]>; Linux Kernel Workflows <[email protected]>; Linux KASAN <[email protected]>; Linux Devicetree <[email protected]>; Linux fsverity <[email protected]>; Linux MTD <[email protected]>; Linux DRI Development <[email protected]>; Linux Kernel Build System <[email protected]>; Linux Networking <[email protected]>; Linux Sound <[email protected]>
Cc: Thomas Gleixner <[email protected]>; Borislav Petkov <[email protected]>; Peter Zijlstra <[email protected]>; Josh Poimboeuf <[email protected]>; Pawan Gupta <[email protected]>; Jonathan Corbet <[email protected]>; SeongJae Park <[email protected]>; Andrew Morton <[email protected]>; David Hildenbrand <[email protected]>; Lorenzo Stoakes <[email protected]>; Liam R. Howlett <[email protected]>; Vlastimil Babka <[email protected]>; Mike Rapoport <[email protected]>; Suren Baghdasaryan <[email protected]>; Michal Hocko <[email protected]>; Huang Rui <[email protected]>; Gautham R. Shenoy <[email protected]>; Mario Limonciello <[email protected]>; Perry Yuan <[email protected]>; Jens Axboe <[email protected]>; Alexei Starovoitov <[email protected]>; Daniel Borkmann <[email protected]>; Andrii Nakryiko <[email protected]>; Martin KaFai Lau <[email protected]>; Eduard Zingerman <[email protected]>; Song Liu <[email protected]>; Yonghong Song <[email protected]>; John Fastabend <[email protected]>; KP Singh <[email protected]>; Stanislav Fomichev <[email protected]>; Hao Luo <[email protected]>; Jiri Olsa <[email protected]>; Dwaipayan Ray <[email protected]>; Lukas Bulwahn <[email protected]>; Joe Perches <[email protected]>; Andrey Ryabinin <[email protected]>; Alexander Potapenko <[email protected]>; Andrey Konovalov <[email protected]>; Dmitry Vyukov <[email protected]>; Vincenzo Frascino <[email protected]>; Rob Herring <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Eric Biggers <[email protected]>; [email protected] <[email protected]>; Richard Weinberger <[email protected]>; Zhihao Cheng <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Thomas Zimmermann <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; Nathan Chancellor <[email protected]>; Nicolas Schier <[email protected]>; Ingo Molnar <[email protected]>; Will Deacon <[email protected]>; Boqun Feng <[email protected]>; Waiman Long <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Simon Horman <[email protected]>; Shay Agroskin <[email protected]>; Arthur Kiyanovski <[email protected]>; David Arinzon <[email protected]>; Saeed Bishara <[email protected]>; Andrew Lunn <[email protected]>; Alexandru Ciobotaru <[email protected]>; The AWS Nitro Enclaves Team <[email protected]>; Jesper Dangaard Brouer <[email protected]>; Bagas Sanjaya <[email protected]>; Laurent Pinchart <[email protected]>; Ranganath V N <[email protected]>; Steven French <[email protected]>; Meetakshi Setiya <[email protected]>; Greg Kroah-Hartman <[email protected]>; Martin K. Petersen <[email protected]>; Bart Van Assche <[email protected]>; Thomas Weißschuh <[email protected]>; Masahiro Yamada <[email protected]>; Mauro Carvalho Chehab <[email protected]>; Jani Nikula <[email protected]>
Subject: [EXTERNAL] [PATCH v2 10/13] Documentation: smb: smbdirect: Convert KSMBD docs link

Convert KSMBD docs link to internal link.

---
 Documentation/filesystems/smb/smbdirect.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/filesystems/smb/smbdirect.rst +2 -2
index ca6927c0b2c084..6258de919511fa 100644
@@ -76,8 +76,8 @@ Installation
 Setup and Usage
 ================
 
-- Set up and start a KSMBD server as described in the `KSMBD documentation
-  <https://www.kernel.org/doc/Documentation/filesystems/smb/ksmbd.rst>`_.
+- Set up and start a KSMBD server as described in the :doc:`KSMBD documentation
+  <ksmbd>`.
   Also add the "server multi channel support = yes" parameter to ksmbd.conf.
 
 - On the client, mount the share with `rdma` mount option to use SMB Direct

--
An old man doll... just what I always wanted! - Clara

#13 lore raw

PATCH v2 11/13 Documentation: net: Convert external kernel networking docs

In reply to Bagas Sanjaya

Convert cross-references to kernel networking docs that use external links into internal ones.

---
 .../device_drivers/can/ctu/ctucanfd-driver.rst       |  3 +--
 .../device_drivers/ethernet/amazon/ena.rst           |  4 ++--
 Documentation/networking/ethtool-netlink.rst         |  3 +--
 Documentation/networking/snmp_counter.rst            | 12 +++++-------
 4 files changed, 9 insertions(+), 13 deletions(-)
Documentation/networking/device_drivers/can/ctu/ctucanfd-driver.rst +1 -2
index 1661d13174d5b8..4f9f36414333fd 100644
@@ -40,8 +40,7 @@ About SocketCAN
 SocketCAN is a standard common interface for CAN devices in the Linux
 kernel. As the name suggests, the bus is accessed via sockets, similarly
 to common network devices. The reasoning behind this is in depth
-described in `Linux SocketCAN <https://www.kernel.org/doc/html/latest/networking/can.html>`_.
-In short, it offers a
+described in Documentation/networking/can.rst. In short, it offers a
 natural way to implement and work with higher layer protocols over CAN,
 in the same way as, e.g., UDP/IP over Ethernet.
 
Documentation/networking/device_drivers/ethernet/amazon/ena.rst +2 -2
index 14784a0a6a8a10..b7b314de857b01 100644
@@ -366,9 +366,9 @@ RSS
 
 DEVLINK SUPPORT
 ===============
-.. _`devlink`: https://www.kernel.org/doc/html/latest/networking/devlink/index.html
 
-`devlink`_ supports reloading the driver and initiating re-negotiation with the ENA device
+:doc:`devlink </networking/devlink/index>` supports reloading the driver and
+initiating re-negotiation with the ENA device
 
 .. code-block:: shell
 
Documentation/networking/ethtool-netlink.rst +1 -2
index ab20c644af2485..3445b575cb5d39 100644
@@ -1100,8 +1100,7 @@ This feature is mainly of interest for specific USB devices which does not cope
 well with frequent small-sized URBs transmissions.
 
 ``ETHTOOL_A_COALESCE_RX_PROFILE`` and ``ETHTOOL_A_COALESCE_TX_PROFILE`` refer
-to DIM parameters, see `Generic Network Dynamic Interrupt Moderation (Net DIM)
-<https://www.kernel.org/doc/Documentation/networking/net_dim.rst>`_.
+to DIM parameters, see Documentation/networking/net_dim.rst.
 
 COALESCE_SET
 ============
Documentation/networking/snmp_counter.rst +5 -7
index ff1e6a8ffe2164..c51d6ca9eff2c7 100644
@@ -782,13 +782,11 @@ TCP ACK skip
 ============
 In some scenarios, kernel would avoid sending duplicate ACKs too
 frequently. Please find more details in the tcp_invalid_ratelimit
-section of the `sysctl document`_. When kernel decides to skip an ACK
-due to tcp_invalid_ratelimit, kernel would update one of below
-counters to indicate the ACK is skipped in which scenario. The ACK
-would only be skipped if the received packet is either a SYN packet or
-it has no data.
-
-.. _sysctl document: https://www.kernel.org/doc/Documentation/networking/ip-sysctl.rst
+section of the Documentation/networking/ip-sysctl.rst. When kernel
+decides to skip an ACK due to tcp_invalid_ratelimit, kernel would
+update one of below counters to indicate the ACK is skipped in
+which scenario. The ACK would only be skipped if the received
+packet is either a SYN packet or it has no data.
 
 * TcpExtTCPACKSkippedSynRecv
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#14 lore raw

PATCH v2 12/13 nitro_enclaves: Use internal cross-reference for kernel docs links

In reply to Bagas Sanjaya

Convert links to kernel docs pages from external link to internal cross-references.

---
 Documentation/virt/ne_overview.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
Documentation/virt/ne_overview.rst +5 -5
index 74c2f5919c886e..572105eab452b2 100644
@@ -91,10 +91,10 @@ running in the primary VM via a poll notification mechanism. Then the user space
 enclave process can exit.
 
 [1] https://aws.amazon.com/ec2/nitro/nitro-enclaves/
-[2] https://www.kernel.org/doc/html/latest/admin-guide/mm/hugetlbpage.html
+[2] Documentation/admin-guide/mm/hugetlbpage.rst
 [3] https://lwn.net/Articles/807108/
-[4] https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
+[4] Documentation/admin-guide/kernel-parameters.rst
 [5] https://man7.org/linux/man-pages/man7/vsock.7.html
-[6] https://www.kernel.org/doc/html/latest/x86/boot.html
-[7] https://www.kernel.org/doc/html/latest/arm64/hugetlbpage.html
-[8] https://www.kernel.org/doc/html/latest/arm64/booting.html
+[6] Documentation/arch/x86/boot.rst
+[7] Documentation/arch/arm64/hugetlbpage.rst
+[8] Documentation/arch/arm64/booting.rst
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#15 lore raw

PATCH v2 13/13 Documentation: checkpatch: Convert kernel docs references

In reply to Bagas Sanjaya

checkpatch documentation has pointer references to various style-related docs. Convert them from external link to internal cross-references.

For reference to docs sections, use section names and reference docs path as anchor text.

---
 Documentation/dev-tools/checkpatch.rst        | 121 ++++++++++++------
 .../bindings/submitting-patches.rst           |   2 +
 .../driver-api/driver-model/device.rst        |   2 +
 Documentation/filesystems/sysfs.rst           |   2 +
 Documentation/kbuild/reproducible-builds.rst  |   2 +
 Documentation/locking/lockdep-design.rst      |   2 +
 Documentation/process/coding-style.rst        |  15 +++
 Documentation/process/deprecated.rst          |   4 +
 Documentation/process/submitting-patches.rst  |   4 +
 9 files changed, 113 insertions(+), 41 deletions(-)
Documentation/dev-tools/checkpatch.rst +80 -41
index d5c47e560324fb..2ec288d845b81d 100644
@@ -247,7 +247,7 @@ Allocation style
     number of elements.  sizeof() as the first argument is generally
     wrong.
 
-    See: https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html
+    See: Documentation/core-api/memory-allocation.rst
 
   **ALLOC_SIZEOF_STRUCT**
     The allocation style is bad.  In general for family of
@@ -260,13 +260,14 @@ Allocation style
 
       p = alloc(sizeof(*p), ...)
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#allocating-memory
+    See: :ref:`"Allocating memory" section on Documentation/process/coding-style.rst
+    <memory-allocation-style>`.
 
   **ALLOC_WITH_MULTIPLY**
     Prefer kmalloc_array/kcalloc over kmalloc/kzalloc with a
     sizeof multiply.
 
-    See: https://www.kernel.org/doc/html/latest/core-api/memory-allocation.html
+    See: Documentation/core-api/memory-allocation.rst
 
 
 API usage
@@ -287,7 +288,8 @@ API usage
     Use WARN() and WARN_ON() instead, and handle the "impossible"
     error condition as gracefully as possible.
 
-    See: https://www.kernel.org/doc/html/latest/process/deprecated.html#bug-and-bug-on
+    See: :ref:`"BUG() and BUG_ON()" section on
+    Documentation/process/deprecated.rst <bug-macros-deprecated>`
 
   **CONSIDER_KSTRTO**
     The simple_strtol(), simple_strtoll(), simple_strtoul(), and
@@ -296,7 +298,9 @@ API usage
     kstrtoll(), kstrtoul(), and kstrtoull() functions tend to be the
     correct replacements.
 
-    See: https://www.kernel.org/doc/html/latest/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull
+    See: :ref:`"simple_strtol(), simple_strtoll(), simple_strtoul(),
+    simple_strtoull() section" on Documentation/process/deprecated.rst
+    <simple-strtol-family-deprecated>`
 
   **CONSTANT_CONVERSION**
     Use of __constant_<foo> form is discouraged for the following functions::
@@ -340,7 +344,8 @@ API usage
 
     The full list of available RCU APIs can be viewed from the kernel docs.
 
-    See: https://www.kernel.org/doc/html/latest/RCU/whatisRCU.html#full-list-of-rcu-apis
+    See: :ref:`"Full list of RCU APIs" section on
+    Documentation/RCU/whatisRCU.rst <8_whatisRCU>`
 
   **DEVICE_ATTR_FUNCTIONS**
     The function names used in DEVICE_ATTR is unusual.
@@ -354,7 +359,8 @@ API usage
 
     The function names should preferably follow the above pattern.
 
-    See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+    See: :ref:`"Attributes" section on
+    Documentation/driver-api/driver-model/device.rst <device-attributes>`
 
   **DEVICE_ATTR_RO**
     The DEVICE_ATTR_RO(name) helper macro can be used instead of
@@ -363,7 +369,8 @@ API usage
     Note that the macro automatically appends _show to the named
     attribute variable of the device for the show method.
 
-    See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+    See: :ref:`"Attributes" section on
+    Documentation/driver-api/driver-model/device.rst <device-attributes>`
 
   **DEVICE_ATTR_RW**
     The DEVICE_ATTR_RW(name) helper macro can be used instead of
@@ -372,7 +379,8 @@ API usage
     Note that the macro automatically appends _show and _store to the
     named attribute variable of the device for the show and store methods.
 
-    See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+    See: :ref:`"Attributes" section on
+    Documentation/driver-api/driver-model/device.rst <device-attributes>`
 
   **DEVICE_ATTR_WO**
     The DEVICE_AATR_WO(name) helper macro can be used instead of
@@ -381,7 +389,8 @@ API usage
     Note that the macro automatically appends _store to the
     named attribute variable of the device for the store method.
 
-    See: https://www.kernel.org/doc/html/latest/driver-api/driver-model/device.html#attributes
+    See: :ref:`"Attributes" section on
+    Documentation/driver-api/driver-model/device.rst <device-attributes>`
 
   **DUPLICATED_SYSCTL_CONST**
     Commit d91bff3011cf ("proc/sysctl: add shared variables for range
@@ -443,7 +452,8 @@ API usage
     lockdep_assert_held() annotations should be preferred over
     assertions based on spin_is_locked()
 
-    See: https://www.kernel.org/doc/html/latest/locking/lockdep-design.html#annotations
+    See: :ref:`"Annotations" section on
+    Documentation/locking/lockdep-design.rst <lockdep-annotations>`
 
   **UAPI_INCLUDE**
     No #include statements in include/uapi should use a uapi/ path.
@@ -472,13 +482,15 @@ Comments
       * for files in net/ and drivers/net/
       */
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting
+    See: :ref:`Commenting section on Documentation/process/coding-style.rst
+    <comments-style>`
 
   **C99_COMMENTS**
     C99 style single line comments (//) should not be used.
     Prefer the block comment style instead.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting
+    See: :ref:`Commenting section on Documentation/process/coding-style.rst
+    <comments-style>`
 
   **DATA_RACE**
     Applications of data_race() should have a comment so as to document the
@@ -512,7 +524,8 @@ Commit message
     The signed-off-by line does not fall in line with the standards
     specified by the community.
 
-    See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
+    See: :ref:`Developer's Certificate of Origin 1.1 text on
+    Documentation/process/submitting-patches.rst <dco-text>`
 
   **BAD_STABLE_ADDRESS_STYLE**
     The email format for stable is incorrect.
@@ -534,14 +547,16 @@ Commit message
     The patch is missing a commit description.  A brief
     description of the changes made by the patch should be added.
 
-    See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
+    See: :ref:`"Describe your changes" section on
+    Documentation/process/submitting-patches.rst <describe_changes>`
 
   **EMAIL_SUBJECT**
     Naming the tool that found the issue is not very useful in the
     subject line.  A good subject line summarizes the change that
     the patch brings.
 
-    See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
+    See: :ref:`"Describe your changes" section on
+    Documentation/process/submitting-patches.rst <describe_changes>`
 
   **FROM_SIGN_OFF_MISMATCH**
     The author's email does not match with that in the Signed-off-by:
@@ -560,7 +575,8 @@ Commit message
     line should be added according to Developer's certificate of
     Origin.
 
-    See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
+    See: :ref:`"Sign your work - the Developer's Certificate of Origin"
+    section on Documentation/process/submitting-patches.rst <dco-signoff>`
 
   **NO_AUTHOR_SIGN_OFF**
     The author of the patch has not signed off the patch.  It is
@@ -569,7 +585,8 @@ Commit message
     written it or otherwise has the rights to pass it on as an open
     source patch.
 
-    See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
+    See: :ref:`"Sign your work - the Developer's Certificate of Origin"
+    section on Documentation/process/submitting-patches.rst <dco-signoff>`
 
   **DIFF_IN_COMMIT_MSG**
     Avoid having diff content in commit message.
@@ -599,14 +616,16 @@ Commit message
       platform_set_drvdata(), but left the variable "dev" unused,
       delete it.
 
-    See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
+    See: :ref:`"Describe your changes" section on
+    Documentation/process/submitting-patches.rst <describe_changes>`
 
   **BAD_FIXES_TAG**
     The Fixes: tag is malformed or does not follow the community conventions.
     This can occur if the tag have been split into multiple lines (e.g., when
     pasted in an email program with word wrapping enabled).
 
-    See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
+    See: :ref:`"Describe your changes" section on
+    Documentation/process/submitting-patches.rst <describe_changes>`
 
 
 Comparison style
@@ -646,7 +665,8 @@ Indentation and Line Breaks
     Outside of comments, documentation and Kconfig,
     spaces are never used for indentation.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#indentation
+    See: :ref:`"Indentation" section on Documentation/process/coding-style.rst
+    <indentation-style>`
 
   **DEEP_INDENTATION**
     Indentation with 6 or more tabs usually indicate overly indented
@@ -678,7 +698,8 @@ Indentation and Line Breaks
               break;
       }
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#indentation
+    See: :ref:`"Indentation" section on Documentation/process/coding-style.rst
+    <indentation-style>`
 
   **LONG_LINE**
     The line has exceeded the specified maximum length.
@@ -690,21 +711,24 @@ Indentation and Line Breaks
     limit to 100 columns.  This is not a hard limit either and it's
     preferable to stay within 80 columns whenever possible.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
+    See: :ref:`"Breaking long lines and strings" section on
+    Documentation/process/coding-style.rst <long-line-break>`
 
   **LONG_LINE_STRING**
     A string starts before but extends beyond the maximum line length.
     To use a different maximum line length, the --max-line-length=n option
     may be added while invoking checkpatch.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
+    See: :ref:`"Breaking long lines and strings" section on
+    Documentation/process/coding-style.rst <long-line-break>`
 
   **LONG_LINE_COMMENT**
     A comment starts before but extends beyond the maximum line length.
     To use a different maximum line length, the --max-line-length=n option
     may be added while invoking checkpatch.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#breaking-long-lines-and-strings
+    See: :ref:`"Breaking long lines and strings" section on
+    Documentation/process/coding-style.rst <long-line-break>`
 
   **SPLIT_STRING**
     Quoted strings that appear as messages in userspace and can be
@@ -803,7 +827,8 @@ Macros, Attributes and Symbols
     and enables warnings if they are used as they can lead to
     non-deterministic builds.
 
-    See: https://www.kernel.org/doc/html/latest/kbuild/reproducible-builds.html#timestamps
+    See: :ref:`"Timestamps" section on
+    Documentation/kbuild/reproducible-builds.rst <kernel-timestamps>`
 
   **DEFINE_ARCH_HAS**
     The ARCH_HAS_xyz and ARCH_HAVE_xyz patterns are wrong.
@@ -868,7 +893,8 @@ Macros, Attributes and Symbols
                         do_this(b, c);          \
         } while (0)
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#macros-enums-and-rtl
+    See: :ref:`"Macros, Enums and RTL" section on
+    Documentation/process/coding-style.rst <macros-style>`
 
   **PREFER_FALLTHROUGH**
     Use the `fallthrough;` pseudo keyword instead of
@@ -907,7 +933,8 @@ Macros, Attributes and Symbols
 
       WARNING: Argument 'a' is not used in function-like macro.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#macros-enums-and-rtl
+    See: :ref:`"Macros, Enums and RTL" section on
+    Documentation/process/coding-style.rst <macros-style>`
 
   **SINGLE_STATEMENT_DO_WHILE_MACRO**
     For the multi-statement macros, it is necessary to use the do-while
@@ -931,7 +958,8 @@ Functions and Variables
   **CAMELCASE**
     Avoid CamelCase Identifiers.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#naming
+    See: :ref:`"Naming" section on Documentation/process/coding-style.rst
+    <naming-convention>`
 
   **CONST_CONST**
     Using `const <type> const *` is generally meant to be
@@ -1018,7 +1046,8 @@ Permissions
     Typically only three permissions are used - 0644 (RW), 0444 (RO)
     and 0200 (WO).
 
-    See: https://www.kernel.org/doc/html/latest/filesystems/sysfs.html#attributes
+    See: :ref:`"Attributes" section on Documentation/filesystems/sysfs.rst
+    <sysfs-attributes>`
 
   **EXECUTE_PERMISSIONS**
     There is no reason for source files to be executable.  The executable
@@ -1074,7 +1103,8 @@ Spacing and Brackets
               body of function
       }
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+    See: :ref:`"Placing Braces and Spaces" section on
+    Documentation/process/coding-style.rst <braces-placement>`
 
   **BRACKET_SPACE**
     Whitespace before opening bracket '[' is prohibited.
@@ -1105,20 +1135,23 @@ Spacing and Brackets
   **ELSE_AFTER_BRACE**
     `else {` should follow the closing block `}` on the same line.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+    See: :ref:`"Placing Braces and Spaces" section on
+    Documentation/process/coding-style.rst <braces-placement>`
 
   **LINE_SPACING**
     Vertical space is wasted given the limited number of lines an
     editor window can display when multiple blank lines are used.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+    See: :ref:`"Spaces" subsection on Documentation/process/coding-style.rst
+    <spaces-usage>`
 
   **OPEN_BRACE**
     The opening brace should be following the function definitions on the
     next line.  For any non-functional block it should be on the same line
     as the last construct.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+    See: :ref:`"Placing Braces and Spaces" section on
+    Documentation/process/coding-style.rst <braces-placement>`
 
   **POINTER_LOCATION**
     When using pointer data or a function that returns a pointer type,
@@ -1130,19 +1163,22 @@ Spacing and Brackets
       unsigned long long memparse(char *ptr, char **retptr);
       char *match_strdup(substring_t *s);
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+    See: :ref:`"Spaces" subsection on Documentation/process/coding-style.rst
+    <spaces-usage>`
 
   **SPACING**
     Whitespace style used in the kernel sources is described in kernel docs.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+    See: :ref:`"Spaces" subsection on Documentation/process/coding-style.rst
+    <spaces-usage>`
 
   **TRAILING_WHITESPACE**
     Trailing whitespace should always be removed.
     Some editors highlight the trailing whitespace and cause visual
     distractions when editing files.
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#spaces
+    See: :ref:`"Spaces" subsection on Documentation/process/coding-style.rst
+    <spaces-usage>`
 
   **UNNECESSARY_PARENTHESES**
     Parentheses are not required in the following cases:
@@ -1182,7 +1218,8 @@ Spacing and Brackets
               ...
       } while(something);
 
-    See: https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces
+    See: :ref:`"Placing Braces and Spaces" section on
+    Documentation/process/coding-style.rst <braces-placement>`
 
 
 Others
@@ -1216,7 +1253,7 @@ Others
     DT bindings moved to a json-schema based format instead of
     freeform text.
 
-    See: https://www.kernel.org/doc/html/latest/devicetree/bindings/writing-schema.html
+    See: Documentation/devicetree/bindings/writing-schema.rst
 
   **DT_SPLIT_BINDING_PATCH**
     Devicetree bindings should be their own patch.  This is because
@@ -1225,7 +1262,9 @@ Others
     are applied via the same tree), and it makes for a cleaner history in the
     DT only tree created with git-filter-branch.
 
-    See: https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
+    See: :ref:`"For patch submitters" section on
+    Documentation/devicetree/bindings/submitting-patches.rst
+    <submitting-dt-patches>`
 
   **EMBEDDED_FILENAME**
     Embedding the complete filename path inside the file isn't particularly
@@ -1253,7 +1292,7 @@ Others
     The Linux kernel requires the precise SPDX identifier in all source files,
     and it is thoroughly documented in the kernel docs.
 
-    See: https://www.kernel.org/doc/html/latest/process/license-rules.html
+    See: Documentation/process/license-rules.rst
 
   **TYPO_SPELLING**
     Some words may have been misspelled.  Consider reviewing them.
Documentation/devicetree/bindings/submitting-patches.rst +2 -0
index 191085b0d5e8ea..7de63c5ce58fbf 100644
@@ -4,6 +4,8 @@
 Submitting Devicetree (DT) binding patches
 ==========================================
 
+.. _submitting-dt-patches:
+
 I. For patch submitters
 =======================
 
Documentation/driver-api/driver-model/device.rst +2 -0
index 0833be568b06ca..7762d11411c5a9 100644
@@ -35,6 +35,8 @@ A driver can access the lock in the device structure using::
   void unlock_device(struct device * dev);
 
 
+.. _device-attributes:
+
 Attributes
 ~~~~~~~~~~
 
Documentation/filesystems/sysfs.rst +2 -0
index 624e4f51212e63..a893e67f7fb2bb 100644
@@ -51,6 +51,8 @@ With the current sysfs implementation the kobject reference count is
 only modified directly by the function sysfs_schedule_callback().
 
 
+.. _sysfs-attributes:
+
 Attributes
 ~~~~~~~~~~
 
Documentation/kbuild/reproducible-builds.rst +2 -0
index f2dcc39044e66d..b0d273f871772a 100644
@@ -13,6 +13,8 @@ The `Reproducible Builds project`_ has more information about this
 general topic.  This document covers the various reasons why building
 the kernel may be unreproducible, and how to avoid them.
 
+.. _kernel-timestamps:
+
 Timestamps
 ----------
 
Documentation/locking/lockdep-design.rst +2 -0
index 56b90eea27312e..c924dd4216c564 100644
@@ -231,6 +231,8 @@ Note: When changing code to use the _nested() primitives, be careful and
 check really thoroughly that the hierarchy is correctly mapped; otherwise
 you can get false positives or false negatives.
 
+.. _lockdep-annotations:
+
 Annotations
 -----------
 
Documentation/process/coding-style.rst +15 -0
index d1a8e5465ed956..4a17c60a9240c0 100644
@@ -15,6 +15,8 @@ and NOT read it.  Burn them, it's a great symbolic gesture.
 Anyway, here goes:
 
 
+.. _indentation-style:
+
 1) Indentation
 --------------
 
@@ -95,6 +97,8 @@ used for indentation, and the above example is deliberately broken.
 Get a decent editor and don't leave whitespace at the end of lines.
 
 
+.. _long-line-break:
+
 2) Breaking long lines and strings
 ----------------------------------
 
@@ -117,6 +121,8 @@ However, never break user-visible strings such as printk messages because
 that breaks the ability to grep for them.
 
 
+.. _braces-placement:
+
 3) Placing Braces and Spaces
 ----------------------------
 
@@ -231,6 +237,8 @@ Also, use braces when a loop contains more than a single simple statement:
 			do_something();
 	}
 
+.. _spaces-usage:
+
 3.1) Spaces
 ***********
 
@@ -303,6 +311,8 @@ of patches, this may make later patches in the series fail by changing their
 context lines.
 
 
+.. _naming-convention:
+
 4) Naming
 ---------
 
@@ -594,6 +604,7 @@ fix for this is to split it up into two error labels ``err_free_bar:`` and
 
 Ideally you should simulate errors to test all exit paths.
 
+.. _comments-style:
 
 8) Commenting
 -------------
@@ -792,6 +803,8 @@ Remember: if another thread can find your data structure, and you don't
 have a reference count on it, you almost certainly have a bug.
 
 
+.. _macros-style:
+
 12) Macros, Enums and RTL
 -------------------------
 
@@ -932,6 +945,8 @@ already inside a debug-related #ifdef section, printk(KERN_DEBUG ...) can be
 used.
 
 
+.. _memory-allocation-style:
+
 14) Allocating memory
 ---------------------
 
Documentation/process/deprecated.rst +4 -0
index 1f7f3e6c9cda9f..8ab538034a29b9 100644
@@ -29,6 +29,8 @@ a header file, it isn't the full solution. Such interfaces must either
 be fully removed from the kernel, or added to this file to discourage
 others from using them in the future.
 
+.. _bug-macros-deprecated:
+
 BUG() and BUG_ON()
 ------------------
 Use WARN() and WARN_ON() instead, and handle the "impossible"
@@ -109,6 +111,8 @@ For more details, also see array3_size() and flex_array_size(),
 as well as the related check_mul_overflow(), check_add_overflow(),
 check_sub_overflow(), and check_shl_overflow() family of functions.
 
+.. _simple-strtol-family-deprecated:
+
 simple_strtol(), simple_strtoll(), simple_strtoul(), simple_strtoull()
 ----------------------------------------------------------------------
 The simple_strtol(), simple_strtoll(),
Documentation/process/submitting-patches.rst +4 -0
index 5778cb9701e14b..387ccb760e1ff8 100644
@@ -393,6 +393,8 @@ e-mail discussions.
 ``git send-email`` will do this for you automatically.
 
 
+.. _dco-signoff:
+
 Sign your work - the Developer's Certificate of Origin
 ------------------------------------------------------
 
@@ -406,6 +408,8 @@ patch, which certifies that you wrote it or otherwise have the right to
 pass it on as an open-source patch.  The rules are pretty simple: if you
 can certify the below:
 
+.. _dco-text:
+
 Developer's Certificate of Origin 1.1
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara