Skip to content

Commit

Permalink
docs: kernel-doc.rst: improve typedef documentation
Browse files Browse the repository at this point in the history
Add documentation about typedefs for function prototypes and
move it to happen earlier.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
mchehab authored and Jonathan Corbet committed Dec 21, 2017
1 parent 553aa3c commit bdb76f9
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions Documentation/doc-guide/kernel-doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,28 @@ The kernel-doc data structure comments describe each member of the structure,
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
-------------------------------
Expand Down Expand Up @@ -384,16 +406,6 @@ on a line of their own, like all other kernel-doc comments::
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
-------------------------------
Expand Down

0 comments on commit bdb76f9

Please sign in to comment.