From 826fc867d4503b222a7fad8896f0b559788192dc Mon Sep 17 00:00:00 2001 From: Andrea Cervesato Date: Wed, 20 Mar 2024 11:05:28 +0100 Subject: [PATCH] Introduce kernel-doc API support kernel-doc API support is introduced by linuxdoc package that includes Linux kernel tools used to generate the documentation. With this patch we fully support the kernel documentation format that can be found here: https://return42.github.io/linuxdoc/linuxdoc-howto/kernel-doc-syntax.html --- doc_new/conf.py | 3 +-- doc_new/developers/api_c_tests.rst | 3 +++ doc_new/developers/api_kvm_tests.rst | 3 +++ doc_new/developers/api_network_tests.rst | 3 +++ doc_new/requirements.txt | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc_new/conf.py b/doc_new/conf.py index b333ebf2a8c2..44122b761495 100644 --- a/doc_new/conf.py +++ b/doc_new/conf.py @@ -14,8 +14,7 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = [] - +extensions = ['linuxdoc.rstKernelDoc'] # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output diff --git a/doc_new/developers/api_c_tests.rst b/doc_new/developers/api_c_tests.rst index c03f9caf1233..adee17f168cf 100644 --- a/doc_new/developers/api_c_tests.rst +++ b/doc_new/developers/api_c_tests.rst @@ -1,4 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0-or-later +.. Include headers in this file with: +.. .. kernel-doc:: ../../include/tst_test.h + Developing using C API ====================== diff --git a/doc_new/developers/api_kvm_tests.rst b/doc_new/developers/api_kvm_tests.rst index 1ef7ec45284a..5ec3fc3a4db8 100644 --- a/doc_new/developers/api_kvm_tests.rst +++ b/doc_new/developers/api_kvm_tests.rst @@ -1,4 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0-or-later +.. Include headers in this file with: +.. .. kernel-doc:: ../../include/tst_test.h + Developing using KVM API ======================== diff --git a/doc_new/developers/api_network_tests.rst b/doc_new/developers/api_network_tests.rst index 4fe45f5f6638..3e487d7f2e9d 100644 --- a/doc_new/developers/api_network_tests.rst +++ b/doc_new/developers/api_network_tests.rst @@ -1,4 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0-or-later +.. Include headers in this file with: +.. .. kernel-doc:: ../../include/tst_test.h + Developing using network API ============================ diff --git a/doc_new/requirements.txt b/doc_new/requirements.txt index 59709ec72117..720e6870e756 100644 --- a/doc_new/requirements.txt +++ b/doc_new/requirements.txt @@ -1 +1,2 @@ sphinx-rtd-theme==2.0.0 +linuxdoc==20231020