]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Documentation: use a source-read extension for the index link boilerplate
authorJani Nikula <jani.nikula@intel.com>
Fri, 23 Jan 2026 14:31:49 +0000 (16:31 +0200)
committerJonathan Corbet <corbet@lwn.net>
Fri, 23 Jan 2026 18:59:34 +0000 (11:59 -0700)
The root document usually has a special :ref:`genindex` link to the
generated index. This is also the case for Documentation/index.rst. The
other index.rst files deeper in the directory hierarchy usually don't.

For SPHINXDIRS builds, the root document isn't Documentation/index.rst,
but some other index.rst in the hierarchy. Currently they have a
".. only::" block to add the index link when doing SPHINXDIRS html
builds.

This is obviously very tedious and repetitive. The link is also added to
all index.rst files in the hierarchy for SPHINXDIRS builds, not just the
root document.

Put the boilerplate in a sphinx-includes/subproject-index.rst file, and
include it at the end of the root document for subproject builds in an
ad-hoc source-read extension defined in conf.py.

For now, keep having the boilerplate in translations, because this
approach currently doesn't cover translated index link headers.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[jc: did s/doctree/kern_doc_dir/ ]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260123143149.2024303-1-jani.nikula@intel.com>

101 files changed:
Documentation/RCU/index.rst
Documentation/accel/index.rst
Documentation/admin-guide/aoe/index.rst
Documentation/admin-guide/auxdisplay/index.rst
Documentation/admin-guide/cgroup-v1/index.rst
Documentation/admin-guide/cifs/index.rst
Documentation/admin-guide/device-mapper/index.rst
Documentation/admin-guide/gpio/index.rst
Documentation/admin-guide/index.rst
Documentation/admin-guide/kdump/index.rst
Documentation/arch/arc/index.rst
Documentation/arch/arm/index.rst
Documentation/arch/arm64/index.rst
Documentation/arch/loongarch/index.rst
Documentation/arch/m68k/index.rst
Documentation/arch/mips/index.rst
Documentation/arch/openrisc/index.rst
Documentation/arch/parisc/index.rst
Documentation/arch/powerpc/index.rst
Documentation/arch/riscv/index.rst
Documentation/arch/s390/index.rst
Documentation/bpf/index.rst
Documentation/cdrom/index.rst
Documentation/conf.py
Documentation/core-api/index.rst
Documentation/core-api/kho/index.rst
Documentation/dev-tools/index.rst
Documentation/doc-guide/index.rst
Documentation/driver-api/80211/index.rst
Documentation/driver-api/coco/index.rst
Documentation/driver-api/crypto/iaa/index.rst
Documentation/driver-api/crypto/index.rst
Documentation/driver-api/cxl/index.rst
Documentation/driver-api/dmaengine/index.rst
Documentation/driver-api/driver-model/index.rst
Documentation/driver-api/early-userspace/index.rst
Documentation/driver-api/firmware/index.rst
Documentation/driver-api/index.rst
Documentation/driver-api/memory-devices/index.rst
Documentation/driver-api/pci/index.rst
Documentation/driver-api/phy/index.rst
Documentation/driver-api/pm/index.rst
Documentation/driver-api/serial/index.rst
Documentation/driver-api/soundwire/index.rst
Documentation/driver-api/surface_aggregator/clients/index.rst
Documentation/driver-api/surface_aggregator/index.rst
Documentation/driver-api/usb/index.rst
Documentation/driver-api/xilinx/index.rst
Documentation/fault-injection/index.rst
Documentation/fb/index.rst
Documentation/fpga/index.rst
Documentation/gpu/drivers.rst
Documentation/gpu/index.rst
Documentation/hwmon/index.rst
Documentation/i2c/index.rst
Documentation/infiniband/index.rst
Documentation/input/devices/index.rst
Documentation/input/index.rst
Documentation/isdn/index.rst
Documentation/kbuild/index.rst
Documentation/livepatch/index.rst
Documentation/locking/index.rst
Documentation/mhi/index.rst
Documentation/netlabel/index.rst
Documentation/networking/device_drivers/atm/index.rst
Documentation/networking/device_drivers/can/index.rst
Documentation/networking/device_drivers/cellular/index.rst
Documentation/networking/device_drivers/ethernet/index.rst
Documentation/networking/device_drivers/ethernet/mellanox/mlx5/index.rst
Documentation/networking/device_drivers/fddi/index.rst
Documentation/networking/device_drivers/hamradio/index.rst
Documentation/networking/device_drivers/index.rst
Documentation/networking/device_drivers/wifi/index.rst
Documentation/networking/device_drivers/wwan/index.rst
Documentation/networking/diagnostic/index.rst
Documentation/networking/index.rst
Documentation/pcmcia/index.rst
Documentation/peci/index.rst
Documentation/power/index.rst
Documentation/process/debugging/index.rst
Documentation/process/index.rst
Documentation/rust/index.rst
Documentation/scheduler/index.rst
Documentation/sound/index.rst
Documentation/sphinx-includes/subproject-index.rst [new file with mode: 0644]
Documentation/spi/index.rst
Documentation/target/index.rst
Documentation/tee/index.rst
Documentation/timers/index.rst
Documentation/tools/index.rst
Documentation/tools/rtla/index.rst
Documentation/tools/rv/index.rst
Documentation/trace/index.rst
Documentation/usb/index.rst
Documentation/userspace-api/gpio/index.rst
Documentation/userspace-api/index.rst
Documentation/virt/index.rst
Documentation/w1/index.rst
Documentation/watchdog/index.rst
Documentation/wmi/devices/index.rst
Documentation/wmi/index.rst

index ef26c78507d369e19013ba206007c349d1075be1..035871687ee220ac6521805e4ea53fe1a9d88c44 100644 (file)
@@ -28,10 +28,3 @@ RCU Handbook
    Design/Expedited-Grace-Periods/Expedited-Grace-Periods
    Design/Requirements/Requirements
    Design/Data-Structures/Data-Structures
-
-.. only:: subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index d8fa332d60a890dbb617454d2a26d9b6f9b196aa..cbc7d4c3876a181d2de6c517486df28116973a90 100644 (file)
@@ -11,10 +11,3 @@ Compute Accelerators
    amdxdna/index
    qaic/index
    rocket/index
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index d71c5df15922ff85cee9aa6bb1ddc0938b73b113..564354bbce571924c3d871f0ba57a52eb27ea668 100644 (file)
@@ -8,10 +8,3 @@ ATA over Ethernet (AoE)
     aoe
     todo
     examples
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index e466f05952482043f6893c20b17ce372e814fc2f..31eae08255fd4d6f3c63dd0858dad7a6880b6fdb 100644 (file)
@@ -7,10 +7,3 @@ Auxiliary Display Support
 
     ks0108.rst
     cfag12864b.rst
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 99fbc8a64ba9e2dbbc248933f957a1bf2a9f150e..14897a8d32b332b4841c5934d7f38a26194c6d63 100644 (file)
@@ -22,10 +22,3 @@ Control Groups version 1
     net_prio
     pids
     rdma
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index fad5268635f55f01a57fdb4073774d135c5b5ac4..58ab58a71a821568c6bd6cd3dc85604df0f82f3e 100644 (file)
@@ -12,10 +12,3 @@ CIFS
    todo
    changes
    authors
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index f1c1f4b824bafe204f7a8814e8dc9bf7b14e8319..030d854628ac21ca8810ba4b0c04c5ba45638df2 100644 (file)
@@ -40,10 +40,3 @@ Device Mapper
     verity
     writecache
     zero
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 712f379731cb5875c6f67ed0cc4bbaf9b42cb825..08264685102975b470f936717f81c3842d4d19bf 100644 (file)
@@ -12,10 +12,3 @@ GPIO
     gpio-sim
     gpio-virtuser
     Obsolete APIs <obsolete>
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 259d79fbeb94460c946e015957571957f2dfc4c0..b734f8a2a2c4817da2713758e324f9873f07e028 100644 (file)
@@ -189,10 +189,3 @@ A few hard-to-categorize and generally obsolete documents.
 
    ldm
    unicode
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 8e2ebd0383cda66915940fde415853fc63289097..cf5d7c868b74abf52e0610bc00c9004283317d0c 100644 (file)
@@ -11,10 +11,3 @@ information.
 
     kdump
     vmcoreinfo
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 7b098d4a5e3eb19633d856cedfd14084cde4c12f..10bf8c2701bfec81118ef31a55a21a1f51cfa8c5 100644 (file)
@@ -8,10 +8,3 @@ ARC architecture
     arc
 
     features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index fd43502ae9246f91c32a4bad4f92851894789d27..afe17db294c4ab59b98e1a3cbc35acf42bef5822 100644 (file)
@@ -75,11 +75,3 @@ SoC-specific documents
    sti/overview
 
    vfp/release-notes
-
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 6a012c98bdcd3b07e2016d6d2d9abea7f9a5828c..af52edc8c0ac68a55775bda78b0e2f74b66d6987 100644 (file)
@@ -33,10 +33,3 @@ ARM64 Architecture
     tagged-pointers
 
     features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index c779bfa00c05b7c3c861b70a22abc3271e9638e0..df590b11724080eded966f8cf3a3cbf1b61505a5 100644 (file)
@@ -13,10 +13,3 @@ LoongArch Architecture
    irq-chip-model
 
    features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 0f890dbb5fe2745487555b45c048a88e829bccbd..c334026e0ae14851bc15b7ebcc79348f40e2cca8 100644 (file)
@@ -11,10 +11,3 @@ m68k Architecture
    buddha-driver
 
    features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 037f85a08fe3bfbca0f6f78074ca6a9ff3a8cccf..703e195b933dc7f5f83dcfa46ca53898bc171e33 100644 (file)
@@ -12,10 +12,3 @@ MIPS-specific Documentation
    ingenic-tcu
 
    features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 6879f998b87a3bdcf40f82e124fef7617b220170..79fe8b0c2c41d1e203af89e337096badf4b1f86d 100644 (file)
@@ -11,10 +11,3 @@ OpenRISC Architecture
    todo
 
    features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 240685751825272b77330a351a5fa79685fe9472..15ccc787fd4fb209873a0e1053ba128962e1283d 100644 (file)
@@ -11,10 +11,3 @@ PA-RISC Architecture
    registers
 
    features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 1be2ee3f0361f7dd0cda09689e5b7a419ba5220c..40419bea8e10e2fcf5bf38ec1405e917d0113d38 100644 (file)
@@ -40,10 +40,3 @@ powerpc
     vpa-dtl
 
     features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index eecf347ce849444bcdb8780019a5c99adcde4c96..830fde0c8aa3e81efbcb93f7ddb2043b4a6f6ccd 100644 (file)
@@ -16,10 +16,3 @@ RISC-V architecture
     cmodx
 
     features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index e75a6e5d2505e6437c43b7efb5f87551db52ba45..769434f0625bdc260c8826c25b53585d27839d95 100644 (file)
@@ -22,10 +22,3 @@ s390 Architecture
     text_files
 
     features
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 0bb5cb8157f133040ce174681e9ea975850b18a7..0d5c6f6592667aafdeb21057949e2a261d7f430c 100644 (file)
@@ -34,12 +34,5 @@ that goes into great technical depth about the BPF Architecture.
    other
    redirect
 
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
-
 .. Links:
 .. _BPF and XDP Reference Guide: https://docs.cilium.io/en/latest/bpf/
index 3ac4f716612ff5a8dde5c7eafb92b51eee49ec08..50050e2199109e5cd5eaad859804f1b0d3263bcf 100644 (file)
@@ -8,10 +8,3 @@ CD-ROM
     :maxdepth: 1
 
     cdrom-standard
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 583be819080c7fba4e982e517ff2bb1bcbf914f5..679861503a254d9796403ee31f158cf514780cfd 100644 (file)
@@ -42,7 +42,7 @@ exclude_patterns = []
 
 # List of patterns that contain directory names in glob format.
 dyn_include_patterns = []
-dyn_exclude_patterns = ["output"]
+dyn_exclude_patterns = ["output", "sphinx-includes"]
 
 # Currently, only netlink/specs has a parser for yaml.
 # Prefer using include patterns if available, as it is faster
@@ -587,7 +587,30 @@ pdf_documents = [
 
 kerneldoc_srctree = ".."
 
+# Add index link at the end of the root document for SPHINXDIRS builds.
+def add_subproject_index(app, docname, content):
+    # Only care about root documents
+    if docname != master_doc:
+        return
+
+    # Add the index link at the root of translations, but not at the root of
+    # individual translations. They have their own language specific links.
+    rel = os.path.relpath(app.srcdir, start=kern_doc_dir).split('/')
+    if rel[0] == 'translations' and len(rel) > 1:
+        return
+
+    # Only add the link for SPHINXDIRS HTML builds
+    if not app.builder.tags.has('subproject') or not app.builder.tags.has('html'):
+        return
+
+    # The include directive needs a relative path from the srcdir
+    rel = os.path.relpath(os.path.join(kern_doc_dir, 'sphinx-includes/subproject-index.rst'),
+                          start=app.srcdir)
+
+    content[0] += f'\n.. include:: {rel}\n\n'
+
 def setup(app):
     """Patterns need to be updated at init time on older Sphinx versions"""
 
     app.connect('config-inited', config_init)
+    app.connect('source-read', add_subproject_index)
index 5eb0fbbbc323c380138cb53a4b263ad90b61ca91..51958aee20b2c242e68ba43c43c5d8e59b8448ba 100644 (file)
@@ -140,10 +140,3 @@ Documents that don't fit elsewhere or which have yet to be categorized.
    librs
    liveupdate
    netlink
-
-.. only:: subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 0c63b0c5c14363e3522fa9382c4471b35d808f36..51ea41c6a20d5121980a2ebcd528406e67e76961 100644 (file)
@@ -9,5 +9,3 @@ Kexec Handover Subsystem
 
    concepts
    fdt
-
-.. only::  subproject and html
index 4b8425e348abd190b3032bcc5394d29ac0d8dd13..4fc9d15f91d090f4c76839e16e58c8026ee62062 100644 (file)
@@ -38,11 +38,3 @@ Documentation/process/debugging/index.rst
    gpio-sloppy-logic-analyzer
    autofdo
    propeller
-
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 24d058faa75c2ce169714bce2cd5caa7f536ba93..f078baddf0b7108c0c0e6005e68ef4c5ea65f904 100644 (file)
@@ -13,10 +13,3 @@ How to write kernel documentation
    contributing
    maintainer-profile
    checktransupdate
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index af210859d3e10a4e78650d2b52cd5967dc0adfd4..62305e9c311359a9dc42dac200026d20cefdbbcd 100644 (file)
@@ -8,10 +8,3 @@ Linux 802.11 Driver Developer's Guide
    cfg80211
    mac80211
    mac80211-advanced
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index af9f08ca0cfd3ef920c49fa48b620cd4a0afb7f3..783c8b033547ef11de63388c2f74292a620477b8 100644 (file)
@@ -8,5 +8,3 @@ Confidential Computing
    :maxdepth: 1
 
    measurement-registers
-
-.. only::  subproject and html
index aa6837e272643fcba85119b2bee97d1914cf990a..463f7da569c55df4e0c4aea6e67122e9c8fb451c 100644 (file)
@@ -11,10 +11,3 @@ API.
    :maxdepth: 1
 
    iaa-crypto
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index fb9709b98beaabd6c4f57082a33e9623006b7d6f..bba669014cb2b7834ba8a3e2a103183682a36635 100644 (file)
@@ -11,10 +11,3 @@ configuration.
    :maxdepth: 1
 
    iaa/index
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index c1106a68b67c6ede81052f0b569c7bb1cc2e4f47..ec8aae9ec0d44c62933f7e0307b6de3dc22d9ae3 100644 (file)
@@ -50,5 +50,3 @@ that have impacts on each other.  The docs here break up configurations steps.
    allocation/page-allocator
    allocation/reclaim
    allocation/hugepages.rst
-
-.. only::  subproject and html
index bdc45d8b4cfb4c98429cdc91f6162de27f2df18f..e74677c664acc067acc686cff2d8706a324b3650 100644 (file)
@@ -46,10 +46,3 @@ This book adds some notes about PXA DMA
    :maxdepth: 1
 
    pxa_dma
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 4831bdd92e5cd42affef81e5d13af14b10e2f39b..abeb4b36636b6c4eb6b0ab091c8e267115a1909b 100644 (file)
@@ -14,10 +14,3 @@ Driver Model
    overview
    platform
    porting
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 149c1822f06d1e1768c39480174dd10f5b624279..ff459471258f6dbc03c07c6feb298486c1adc7ca 100644 (file)
@@ -9,10 +9,3 @@ Early Userspace
 
     early_userspace_support
     buffer-format
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 9d2c19dc8e36bcc1bd2492f9fed28e90756f4c49..86a3dd4bc3f8a5b9a5218e450b4d6150aab29bfd 100644 (file)
@@ -10,10 +10,3 @@ Linux Firmware API
    request_firmware
    fw_upload
    other_interfaces
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 1833e6a0687e40b9390c0f8af3fa9f3d636c6e4d..eaf7161ff957816d4e1ce0e971f4d11ebaa39b65 100644 (file)
@@ -149,10 +149,3 @@ Subsystem-specific APIs
    wmi
    xilinx/index
    zorro
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 28101458cda5727e9b36025f4db50f6f22a750fd..3b6308113611f3f1a1d71b2b75a313f03bdba9bd 100644 (file)
@@ -9,10 +9,3 @@ Memory Controller drivers
 
     ti-emif
     ti-gpmc
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 9e1b801d0f7476a31bc408c0f3ad1619b23573c7..1abfbecf6ce6c4df8c870c3945aca376039f188e 100644 (file)
@@ -11,10 +11,3 @@ The Linux PCI driver implementer's API guide
    pci
    p2pdma
    tsm
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 69ba1216de72209e8ed83829494c1307cf3348a8..579cfe3b7b82fbc5041d3039f943f9e9615c454f 100644 (file)
@@ -8,11 +8,3 @@ Generic PHY Framework
 
    phy
    samsung-usb2
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
-
index c2a9ef8d115ceb91a646c6b9e4f41966b22116ce..4d6c32e32a72840713fb6247a9a2a5547f4a77aa 100644 (file)
@@ -10,10 +10,3 @@ CPU and Device Power Management
    devices
    notifiers
    types
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 03a55b987a1d1e016c2c6dc5297962a35f9fc9f9..610744df5e8d25d7bc3f9df45dbf9cd44ae99ed7 100644 (file)
@@ -18,10 +18,3 @@ Serial drivers
 
     serial-iso7816
     serial-rs485
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index ef8d90dfbddef6aff78f4ef4603cb4d8be2fdeb1..f7abf4a95be71a0310093f37c9b443f1e904ace5 100644 (file)
@@ -11,10 +11,3 @@ SoundWire Documentation
    locking
    bra
    bra_cadence
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 30160513afa5bbd9afb8c0073c4fef0b8a700d65..c32313b8f3b7ec1f319514942967739382818336 100644 (file)
@@ -14,10 +14,3 @@ on how to write client drivers.
    cdev
    dtx
    san
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 6f3e1094904d827edcc59057f8a7993bef5153ff..f0128fe59a324e9930f6f35b4f9746287d92fc22 100644 (file)
@@ -12,10 +12,3 @@ Surface System Aggregator Module (SSAM)
    clients/index
    ssh
    internal
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index fcb24d0500d91d97b582ccbaa5206d1ffbd275e6..a32819963b99ca6bd8e3239d0ef42d1b251a4bf6 100644 (file)
@@ -22,10 +22,3 @@ Linux USB API
    typec
    typec_bus
    usb3-debug-port
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 13f7589ed442912adf707b942475cd58c260d486..c95bda55da6fceedeff1e5214b1d3730e0fb4f10 100644 (file)
@@ -7,10 +7,3 @@ Xilinx FPGA
     :maxdepth: 1
 
     eemi
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index a6ea1d1902225ca850b6ca03b1c738a172feffc1..2a9e30b4202c6b9d24a35c40b84e8f7b6e7b885c 100644 (file)
@@ -11,10 +11,3 @@ Fault-injection
     notifier-error-inject
     nvme-fault-injection
     provoke-crashes
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index e2f7488b6e2e426ad9a66ab195c06e37632954d8..fe9ca357094116bbaf3843575370de4a439b7bc4 100644 (file)
@@ -50,10 +50,3 @@ Driver documentation
    vesafb
    viafb
    vt8623fb
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 43c968871d995ad4e2ece499a15837a352e8e0ee..c5a876165dabb75795a42d0950585f30ba6ded00 100644 (file)
@@ -8,10 +8,3 @@ FPGA
     :maxdepth: 1
 
     dfl
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 78b80be17f210aa55beb4303bf428cf7290f5c41..2e13e0ad7e88bbe68d01894db87ac7230354a0cc 100644 (file)
@@ -26,10 +26,3 @@ GPU Driver Documentation
    panthor
    zynqmp
    nova/index
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 7dcb15850afdb25e9290f682046ad5c3a9ab067b..2fafa1f35ef3226f5329024f39cb5f5d7ade03ef 100644 (file)
@@ -22,10 +22,3 @@ GPU Driver Developer's Guide
    implementation_guidelines
    todo
    rfc/index
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 85d7a686883ec0ce137f619f97dc841c04c04d34..fc9d39b098efe0f50ca849a31f46303c4d82869a 100644 (file)
@@ -281,10 +281,3 @@ Hardware Monitoring Kernel Drivers
    xdpe12284
    xdpe152c4
    zl6100
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 2b213d4ce89c4f303494c305b6cf66b366edbfb3..ccf13718ce705481630200057e52b55040c19fce 100644 (file)
@@ -66,10 +66,3 @@ Legacy documentation
    :maxdepth: 1
 
    old-module-parameters
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 5b4c24125f66d118247d8dd4c0d11f283dd9d634..c11049d25703cc0ee5aac97abf2e1807ae34cdce 100644 (file)
@@ -15,10 +15,3 @@ InfiniBand
    ucaps
    user_mad
    user_verbs
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 95a453782bad377d234e101700d031f69d9f26bd..6de4365ad2888b57dba2dd6c016ee25407abb7ac 100644 (file)
@@ -10,10 +10,3 @@ Linux kernel, their protocols, and driver details.
    :glob:
 
    *
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 35581cd18e91ad805e07757b990574ae953f9b70..fbde5bc9f6416f2ba06e044a7a9a27876c66d3d0 100644 (file)
@@ -10,10 +10,3 @@ Contents:
    input_uapi
    input_kapi
    devices/index
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 9622939fa5268c4f43ff6bb51cb61d9f685ebbed..d1125a16a746fb8dbe31d059d5ca09ff2f77a4ee 100644 (file)
@@ -12,10 +12,3 @@ ISDN
    m_isdn
 
    credits
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 3731ab22bfe745c5c51963cffe58fb652dadf88c..f46233be82b916e4c4b2625f4c48070f4a8515c5 100644 (file)
@@ -24,10 +24,3 @@ Kernel Build System
     gendwarfksyms
 
     bash-completion
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index cebf1c71d4a588fd89814d3626ce0df07b481540..d2e7aa0f7f890cf3d00d443b2c382fa8e1444b89 100644 (file)
@@ -15,10 +15,3 @@ Kernel Livepatching
     system-state
     reliable-stacktrace
     api
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 6a9ea96c8bcb7013ac97715550d6845bfb188593..9278d95b7dcb45a81a9cfe998a461c908bdb8273 100644 (file)
@@ -24,10 +24,3 @@ Locking
     percpu-rw-semaphore
     robust-futexes
     robust-futex-ABI
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 1d8dec302780dda27cf1a9e61e3228b49b38cc6b..0aa00482aa2e2d7ec4941154a8c6947dc0a0ac40 100644 (file)
@@ -9,10 +9,3 @@ MHI
 
    mhi
    topology
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 984e1b191b12f5373b48c826dc754759bdac6068..bb6ba7d5c2007cd53308e923c4013eef5510f602 100644 (file)
@@ -12,10 +12,3 @@ NetLabel
     lsm_interface
 
     draft_ietf
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 7b593f031a60e5fa231463b5640eb15bf4f045b7..724552ca0be4438f70dbf4c243d03bc17a562c25 100644 (file)
@@ -11,10 +11,3 @@ Contents:
    cxacru
    fore200e
    iphase
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 6a8a4f74fa2677d118c72b5e554086f06b2f6f98..af43699895224cd7c0f7279424d5b45179e654fa 100644 (file)
@@ -13,10 +13,3 @@ Contents:
    can327
    ctu/ctucanfd-driver
    freescale/flexcan
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index fc1812d3fc708fff4726ae96ac00b502cf6d2fbb..9690c3ba08ef465fd876496cbecc74858dfdcf72 100644 (file)
@@ -9,10 +9,3 @@ Contents:
    :maxdepth: 2
 
    qualcomm/rmnet
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index bcc02355f828bc5c5fbcb87f0f2e5e4b45256849..142ac0bf781bd90674d00702c12aa9609e14c6a7 100644 (file)
@@ -64,10 +64,3 @@ Contents:
    wangxun/txgbevf
    wangxun/ngbe
    wangxun/ngbevf
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 581a91caa57958178e84b7dfd94fb0793b61dc5b..56f3966de3f0809bd6966ac7c76d6d29a2424f75 100644 (file)
@@ -16,10 +16,3 @@ Contents:
    switchdev
    tracepoints
    counters
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 0b75294e6c8b7dda7007b4e61c07f694d8b30638..c7cf2347e2159c3e708183176b952db99f713f3c 100644 (file)
@@ -10,10 +10,3 @@ Contents:
 
    defza
    skfp
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 7e731732057b82bbdbe8c6b1de392a1a6f00f249..6af481c5b0200cbc18a98b9bcd6204cea6e0eea6 100644 (file)
@@ -10,10 +10,3 @@ Contents:
 
    baycom
    z8530drv
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index a254af25b7efcb8d5b941bbd4a404c4d4b6e653a..1df51c9f7827c3e5194021c0edcb0e6ff46e6412 100644 (file)
@@ -16,10 +16,3 @@ Contents:
    hamradio/index
    wifi/index
    wwan/index
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index fb394f5de4a945741217e9cf96dd8386a9d278ac..29ba9ea64b251c84ce14f344e50613951bce0482 100644 (file)
@@ -10,10 +10,3 @@ Contents:
 
    intel/ipw2100
    intel/ipw2200
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 370d8264d5dcc7ccf4cbe01cdd5b21217612cf25..b768ae89f723276e4acc2b8a3f3d4e0040e8aaa8 100644 (file)
@@ -10,10 +10,3 @@ Contents:
 
    iosm
    t7xx
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 86488aa46b48467f4577ddb7e2fc45c8d230e7ba..592263a2713a9b54cedf797661e1a625e3818ad4 100644 (file)
@@ -8,10 +8,3 @@ Networking Diagnostics
    :maxdepth: 2
 
    twisted_pair_layer1_diagnostics.rst
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 75db2251649b8541244144ce7044258f1978820f..0f72de94b88100840dcd576bc52db9b33f3aa236 100644 (file)
@@ -134,10 +134,3 @@ Contents:
    xfrm/index
    xdp-rx-metadata
    xsk-tx-metadata
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 8067236c51ab4208af1789eb907c479891685346..89c004816140ee606bc6efedaddca9c3dcf58e4f 100644 (file)
@@ -11,10 +11,3 @@ PCMCIA
     devicetable
     locking
     driver-changes
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 930e75217c33337418dcf4020d1c10f7f3944571..1443c31a0d18fe00525eb828b5c976c2e1aacab6 100644 (file)
@@ -7,10 +7,3 @@ PECI Subsystem
 .. toctree::
 
    peci
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index ea70633d9ce6c1c1ee9040bbfa254fb8edee834d..b4581e4ae785b57f7a93118deb7794202470f4e8 100644 (file)
@@ -38,10 +38,3 @@ Power Management
     regulator/machine
     regulator/overview
     regulator/regulator
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 387d33d16f5ed24eec7dd92ffc027f4e6d22db87..357243e184e1c889cac5df2ab680595613a1dd17 100644 (file)
@@ -15,8 +15,6 @@ general guides
    kgdb
    userspace_debugging_guide
 
-.. only::  subproject and html
-
 subsystem specific guides
 -------------------------
 
@@ -25,13 +23,6 @@ subsystem specific guides
 
    media_specific_debugging_guide
 
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
-
 General debugging advice
 ========================
 
index 9d1a73329007b36ce48b85ddab651d39f4527c58..7bea184b73385beffc32dfd8c790321dd9b878cf 100644 (file)
@@ -110,10 +110,3 @@ developers:
 
    kernel-docs
    deprecated
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index ec62001c7d8c78581db01947bd975919b7206547..7a31843cd4a3f07f5f0b2f6e4b1cc598da490155 100644 (file)
@@ -58,10 +58,3 @@ more details.
 
 You can also find learning materials for Rust in its section in
 :doc:`../process/kernel-docs`.
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 5dd53e47bc0c269f507b09fce800709c8acce218..17ce8d76befc1bb1dc289e9243bdca98c9ccb172 100644 (file)
@@ -25,10 +25,3 @@ Scheduler
     sched-debug
 
     text_files
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 51cd736f65b528c79d53f30f3e0cce7aff44d2e3..c075ca6e11eb040259918d2e7188229c34526a71 100644 (file)
@@ -15,10 +15,3 @@ Sound Subsystem Documentation
    cards/index
    codecs/index
    utimers
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
diff --git a/Documentation/sphinx-includes/subproject-index.rst b/Documentation/sphinx-includes/subproject-index.rst
new file mode 100644 (file)
index 0000000..efffdb5
--- /dev/null
@@ -0,0 +1,7 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. This file is included in subproject root documents in conf.py
+
+Indices
+=======
+
+* :ref:`genindex`
index 824ce42ed4f0592e1eed5a78305ca15e47822184..20d4a4185ab97e72766c4ac4f3f5bc4926b9518b 100644 (file)
@@ -12,10 +12,3 @@ Serial Peripheral Interface (SPI)
    butterfly
    spi-lm70llp
    spi-sc18is602
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 4b24f81f747e33adef81d65ff6f776125b4e3521..51fa8ebc652ef332e8846f1fc411e7fb2041d764 100644 (file)
@@ -10,10 +10,3 @@ TCM Virtual Device
     tcmu-design
     tcm_mod_builder
     scripts
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 62afb7ee9b52b1ce5e663d89dfe3f17d95e57cf4..10c3cecde85d80387a154085e7e2f0359c3fbd06 100644 (file)
@@ -12,10 +12,3 @@ TEE Subsystem
    amd-tee
    ts-tee
    qtee
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 4e88116e4dcf73288243f5182956619cdeb9e0ba..c8352756b48076243746b5348a259f761691ea43 100644 (file)
@@ -13,10 +13,3 @@ Timers
     no_hz
     timekeeping
     delay_sleep_functions
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 89b81a13c6a19a193a93411477743e2d0ac672a2..5f2f63bcb2841ea7fbdb1750cab99785df927142 100644 (file)
@@ -13,10 +13,3 @@ more additions are needed here:
    rtla/index
    rv/index
    python
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 05d2652e40721b5bdf24416a23ed7f01bd6ab97e..7664d6d0cb27346682f5318dd9c34562b4065982 100644 (file)
@@ -18,10 +18,3 @@ behavior on specific hardware.
    rtla-timerlat-hist
    rtla-timerlat-top
    rtla-hwnoise
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 64ba2efe2e85a3e3452fcb8f2a17193c64eda592..fd42b0017d07f16d0343cf2bd28c37da24b990bd 100644 (file)
@@ -16,10 +16,3 @@ Runtime verification (rv) tool
    rv-mon-wip
    rv-mon-wwnr
    rv-mon-sched
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index b4a429dc4f7ad6ab172cdcc2837a144e819247a4..cfd8128ac56d5330bc626946b599fd05a02e64cf 100644 (file)
@@ -95,10 +95,3 @@ Additional Resources
 
 For more details, refer to the respective documentation of each
 tracing tool and framework.
-
-.. only:: subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 826492c813acd6ec5162c97312ff9a2a4b27633a..605233febd7a957fbe2c64fe271d752b4ee3adf9 100644 (file)
@@ -31,10 +31,3 @@ USB support
 
     usb-help
     text_files
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index f258de4ef370f7efe8d50eff87974d49ee3552ca..ac9c6ff9875c0b4995162caf64825c8c9c4684b0 100644 (file)
@@ -9,10 +9,3 @@ GPIO
 
     Character Device Userspace API <chardev>
     Obsolete Userspace APIs <obsolete>
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 8a61ac4c1bf1915bef6f42bd44c9fe3d1132817f..6f0235ecc57287556ea61e2d95956c24459da411 100644 (file)
@@ -68,10 +68,3 @@ Everything else
    futex2
    perf_ring_buffer
    ntsync
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 7fb55ae08598d5cad1844b8474b3e4d2af1d5444..c1f0bbc373156a1f65f5381ebbb9ee717c028fcd 100644 (file)
@@ -16,10 +16,3 @@ Virtualization Support
    coco/sev-guest
    coco/tdx-guest
    hyperv/index
-
-.. only:: html and subproject
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 156279f17553b76d3b1f0160795fb31b5c9316ec..2e7bd8afea84eab3f114505609fe03bb48c35bc7 100644 (file)
    w1-netlink.rst
    masters/index
    slaves/index
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index 4603f2511f582ccdfc0f7b13fe57d1e2893544c9..1cea24681e6bdd9590202b46df2c6778f3a200fa 100644 (file)
@@ -16,10 +16,3 @@ Watchdog Support
     watchdog-pm
     wdt
     convert_drivers_to_kernel_api
-
-.. only::  subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index c08735a9d7df36013046499d2326161e2645c6e9..b0a9b4229addc482b22b60f6d07f0942dccb5c33 100644 (file)
@@ -13,10 +13,3 @@ the Linux kernel, their protocols and driver details.
    :glob:
 
    *
-
-.. only:: subproject and html
-
-   Indices
-   =======
-
-   * :ref:`genindex`
index fec4b6ae97b3b545725a16767da41f6135ee61a9..56016078fc79a8c29a436ba219cabb7a62090d5a 100644 (file)
@@ -10,11 +10,3 @@ WMI Subsystem
    acpi-interface
    driver-development-guide
    devices/index
-
-.. only::  subproject and html
-
-
-   Indices
-   =======
-
-   * :ref:`genindex`