Commit bdb76f9e authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

docs: kernel-doc.rst: improve typedef documentation

Add documentation about typedefs for function prototypes and
move it to happen earlier.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 553aa3c1
...@@ -282,6 +282,28 @@ The kernel-doc data structure comments describe each member of the structure, ...@@ -282,6 +282,28 @@ The kernel-doc data structure comments describe each member of the structure,
in order, with the member descriptions. in order, with the member descriptions.
Typedef documentation
---------------------
The general format of a typedef kernel-doc comment is::
/**
* typedef type_name - Brief description.
*
* Description of the type.
*/
Typedefs with function prototypes can also be documented::
/**
* typedef type_name - Brief description.
* @arg1: description of arg1
* @arg2: description of arg2
*
* Description of the type.
*/
typedef void (*type_name)(struct v4l2_ctrl *arg1, void *arg2);
Highlights and cross-references Highlights and cross-references
------------------------------- -------------------------------
...@@ -384,16 +406,6 @@ on a line of their own, like all other kernel-doc comments:: ...@@ -384,16 +406,6 @@ on a line of their own, like all other kernel-doc comments::
int foobar; int foobar;
} }
Typedef documentation
---------------------
The general format of a typedef kernel-doc comment is::
/**
* typedef type_name - Brief description.
*
* Description of the type.
*/
Overview documentation comments Overview documentation comments
------------------------------- -------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment