[PATCH 00/14] Internalize www.kernel.org/doc cross-reference

Bagas Sanjaya posted 14 patches 1 month ago
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/sound/soc/codec.rst             |   4 +-
Documentation/sound/soc/platform.rst          |   4 +-
Documentation/virt/ne_overview.rst            |  10 +-
28 files changed, 165 insertions(+), 107 deletions(-)
[PATCH 00/14] Internalize www.kernel.org/doc cross-reference
Posted by Bagas Sanjaya 1 month ago
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. 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.

Bagas Sanjaya (14):
  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
  ASoC: doc: Internally link to Writing an ALSA Driver 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/sound/soc/codec.rst             |   4 +-
 Documentation/sound/soc/platform.rst          |   4 +-
 Documentation/virt/ne_overview.rst            |  10 +-
 28 files changed, 165 insertions(+), 107 deletions(-)


base-commit: ee9a6691935490dc39605882b41b9452844d5e4e
-- 
An old man doll... just what I always wanted! - Clara
Re: [PATCH 00/14] Internalize www.kernel.org/doc cross-reference
Posted by Jani Nikula 1 month ago
On Fri, 29 Aug 2025, Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> 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. Note that this does not
> cover docs.kernel.org links nor touching Documentation/tools (as
> docs containing external links are in manpages).

FWIW, I'd much prefer using :ref: on rst anchors (that automatically
pick the link text from the target heading) instead of manually adding
link texts and file references.

i.e.

.. _some_target:

Heading After Some Target
=========================

See :ref:`some_target`.

Will generate "See Heading After Some Target".


BR,
Jani.


-- 
Jani Nikula, Intel
Re: [PATCH 00/14] Internalize www.kernel.org/doc cross-reference
Posted by Bagas Sanjaya 1 month ago
On Fri, Aug 29, 2025 at 03:18:20PM +0300, Jani Nikula wrote:
> FWIW, I'd much prefer using :ref: on rst anchors (that automatically
> pick the link text from the target heading) instead of manually adding
> link texts and file references.
> 
> i.e.
> 
> .. _some_target:
> 
> Heading After Some Target
> =========================
> 
> See :ref:`some_target`.
> 
> Will generate "See Heading After Some Target".

I did that in patch [14/14], but I had to write out explicit anchor text
considering people reading rst source. When they encounter checkpatch warning
and they'd like to learn about solution by following See: links, they should be
able to locate the actual docs and section mentioned without leaving the
terminal. Before this series, however, they need to click the https link
provided, which leads to relevant docs in docs.kernel.org that its source is
already in Documentation/.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara
Re: (subset) [PATCH 00/14] Internalize www.kernel.org/doc cross-reference
Posted by Mark Brown 1 month ago
On Fri, 29 Aug 2025 14:55:10 +0700, Bagas Sanjaya wrote:
> 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``).
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[12/14] ASoC: doc: Internally link to Writing an ALSA Driver docs
        commit: f522da9ab56c96db8703b2ea0f09be7cdc3bffeb

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark