linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: linux-doc@vger.kernel.org
Cc: Bagas Sanjaya <bagasdotme@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	"David S. Miller" <davem@davemloft.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Jens Axboe <axboe@kernel.dk>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Akira Yokosawa <akiyks@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/2] Documentation: kernel-doc: Promote "Writing kernel-doc comments" to page title
Date: Sat, 26 Mar 2022 19:33:37 +0700	[thread overview]
Message-ID: <20220326123337.642536-2-bagasdotme@gmail.com> (raw)
In-Reply-To: <20220326123337.642536-1-bagasdotme@gmail.com>

Promote the first heading from chapter heading to page title. While at
it, fix heading inconsistencies by promoting the appropriate headings.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Akira Yokosawa <akiyks@gmail.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/doc-guide/kernel-doc.rst | 29 +++++++++++++-------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
index 79aaa55d6bcf2b..ea41e05d0e8903 100644
--- a/Documentation/doc-guide/kernel-doc.rst
+++ b/Documentation/doc-guide/kernel-doc.rst
@@ -1,3 +1,4 @@
+===========================
 Writing kernel-doc comments
 ===========================
 
@@ -31,7 +32,7 @@ kernel source code layout. This is lower priority and at the discretion
 of the maintainer of that kernel source file.
 
 How to format kernel-doc comments
----------------------------------
+=================================
 
 The opening comment mark ``/**`` is used for kernel-doc comments. The
 ``kernel-doc`` tool will extract comments marked this way. The rest of
@@ -56,7 +57,7 @@ requested to perform extra gcc checks::
 	make W=n
 
 Function documentation
-----------------------
+======================
 
 The general format of a function and function-like macro kernel-doc comment is::
 
@@ -88,7 +89,7 @@ ends with an argument description, a blank comment line, or the end of the
 comment block.
 
 Function parameters
-~~~~~~~~~~~~~~~~~~~
+-------------------
 
 Each function argument should be described in order, immediately following
 the short function description.  Do not leave a blank line between the
@@ -116,7 +117,7 @@ be written in kernel-doc notation as::
       * @...: description
 
 Function context
-~~~~~~~~~~~~~~~~
+----------------
 
 The context in which a function can be called should be described in a
 section named ``Context``. This should include whether the function
@@ -134,7 +135,7 @@ Examples::
   * Context: Interrupt context.
 
 Return values
-~~~~~~~~~~~~~
+-------------
 
 The return value, if any, should be described in a dedicated section
 named ``Return``.
@@ -166,7 +167,7 @@ named ``Return``.
      effect.
 
 Structure, union, and enumeration documentation
------------------------------------------------
+===============================================
 
 The general format of a struct, union, and enum kernel-doc comment is::
 
@@ -189,7 +190,7 @@ lines, and ends with a member description, a blank comment line, or the
 end of the comment block.
 
 Members
-~~~~~~~
+-------
 
 Members of structs, unions and enums should be documented the same way
 as function parameters; they immediately succeed the short description
@@ -223,7 +224,7 @@ Example::
   };
 
 Nested structs/unions
-~~~~~~~~~~~~~~~~~~~~~
+---------------------
 
 It is possible to document nested structs and unions, like::
 
@@ -274,7 +275,7 @@ It is possible to document nested structs and unions, like::
       should be documented as ``@bar:``
 
 In-line member documentation comments
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+-------------------------------------
 
 The structure members may also be documented in-line within the definition.
 There are two styles, single-line comments where both the opening ``/**`` and
@@ -311,7 +312,7 @@ on a line of their own, like all other kernel-doc comments::
   };
 
 Typedef documentation
----------------------
+=====================
 
 The general format of a typedef kernel-doc comment is::
 
@@ -336,7 +337,7 @@ Typedefs with function prototypes can also be documented::
    typedef void (*type_name)(struct v4l2_ctrl *arg1, void *arg2);
 
 Highlights and cross-references
--------------------------------
+===============================
 
 The following special patterns are recognized in the kernel-doc comment
 descriptive text and converted to proper reStructuredText markup and `Sphinx C
@@ -385,7 +386,7 @@ Domain`_ references.
   instead. This is mostly for legacy comments.
 
 Cross-referencing from reStructuredText
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+=======================================
 
 No additional syntax is needed to cross-reference the functions and types
 defined in the kernel-doc comments from reStructuredText documents.
@@ -408,7 +409,7 @@ through the following syntax::
 For further details, please refer to the `Sphinx C Domain`_ documentation.
 
 Overview documentation comments
--------------------------------
+===============================
 
 To facilitate having source code and comments close together, you can include
 kernel-doc documentation blocks that are free-form comments instead of being
@@ -524,7 +525,7 @@ source.
 .. _kernel_doc:
 
 How to use kernel-doc to generate man pages
--------------------------------------------
+===========================================
 
 If you just want to use kernel-doc to generate man pages you can do this
 from the kernel git tree::
-- 
An old man doll... just what I always wanted! - Clara


  reply	other threads:[~2022-03-26 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26 12:33 [PATCH v2 0/2] Documentation: doc-guide: Add missing page titles Bagas Sanjaya
2022-03-26 12:33 ` Bagas Sanjaya [this message]
2022-03-26 13:56   ` [PATCH v2 1/2] Documentation: kernel-doc: Promote "Writing kernel-doc comments" to page title Mauro Carvalho Chehab
2022-03-27  5:27     ` Bagas Sanjaya
2022-03-27  8:50       ` Akira Yokosawa
2022-03-26 12:33 ` [PATCH v2 2/2] Documentation: sphinx: replace "Introduction" chapter heading with " Bagas Sanjaya
2022-03-26 13:57   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220326123337.642536-2-bagasdotme@gmail.com \
    --to=bagasdotme@gmail.com \
    --cc=akiyks@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).