doc-guide: kernel-doc: move in-line section to be after nested struct
We want to give some examples about how to do in-line comments for nested structs. So, move it to be after nested structs/unions chapter. The section content was not changed on this patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>hifive-unleashed-5.1
parent
6e96788bd8
commit
d2253a4557
|
@ -211,34 +211,6 @@ Example::
|
||||||
int d;
|
int d;
|
||||||
};
|
};
|
||||||
|
|
||||||
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
|
|
||||||
closing ``*/`` are on the same line, and multi-line comments where they are each
|
|
||||||
on a line of their own, like all other kernel-doc comments::
|
|
||||||
|
|
||||||
/**
|
|
||||||
* struct foo - Brief description.
|
|
||||||
* @foo: The Foo member.
|
|
||||||
*/
|
|
||||||
struct foo {
|
|
||||||
int foo;
|
|
||||||
/**
|
|
||||||
* @bar: The Bar member.
|
|
||||||
*/
|
|
||||||
int bar;
|
|
||||||
/**
|
|
||||||
* @baz: The Baz member.
|
|
||||||
*
|
|
||||||
* Here, the member description may contain several paragraphs.
|
|
||||||
*/
|
|
||||||
int baz;
|
|
||||||
/** @foobar: Single line description. */
|
|
||||||
int foobar;
|
|
||||||
};
|
|
||||||
|
|
||||||
Nested structs/unions
|
Nested structs/unions
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -290,6 +262,34 @@ It is possible to document nested structs and unions, like::
|
||||||
#) When the nested struct/union is anonymous, the member ``bar`` in it
|
#) When the nested struct/union is anonymous, the member ``bar`` in it
|
||||||
should be documented as ``@bar:``
|
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
|
||||||
|
closing ``*/`` are on the same line, and multi-line comments where they are each
|
||||||
|
on a line of their own, like all other kernel-doc comments::
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct foo - Brief description.
|
||||||
|
* @foo: The Foo member.
|
||||||
|
*/
|
||||||
|
struct foo {
|
||||||
|
int foo;
|
||||||
|
/**
|
||||||
|
* @bar: The Bar member.
|
||||||
|
*/
|
||||||
|
int bar;
|
||||||
|
/**
|
||||||
|
* @baz: The Baz member.
|
||||||
|
*
|
||||||
|
* Here, the member description may contain several paragraphs.
|
||||||
|
*/
|
||||||
|
int baz;
|
||||||
|
/** @foobar: Single line description. */
|
||||||
|
int foobar;
|
||||||
|
};
|
||||||
|
|
||||||
Typedef documentation
|
Typedef documentation
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue