summaryrefslogtreecommitdiffstats
path: root/Documentation/doc-guide
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-16 08:48:19 -0500
committerJonathan Corbet <corbet@lwn.net>2018-02-18 18:55:10 -0500
commitdbcce2bfb7766dbe5d3e293930cce57d0cd6badc (patch)
treeb936a33ff5a85f84d8c3e604780a882e932d10de /Documentation/doc-guide
parentfe7bc493d9795c0ad6012fca0f8144d45af48f8d (diff)
doc-guide: kernel-doc: add examples about nested union/structs
It helps to give some examples about how to use in-line comments also when nested union/structs are present. So add it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/doc-guide')
-rw-r--r--Documentation/doc-guide/kernel-doc.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
index 1ddfe35c0e78..c6c329708d8a 100644
--- a/Documentation/doc-guide/kernel-doc.rst
+++ b/Documentation/doc-guide/kernel-doc.rst
@@ -286,8 +286,17 @@ on a line of their own, like all other kernel-doc comments::
286 * Here, the member description may contain several paragraphs. 286 * Here, the member description may contain several paragraphs.
287 */ 287 */
288 int baz; 288 int baz;
289 /** @foobar: Single line description. */ 289 union {
290 int foobar; 290 /** @foobar: Single line description. */
291 int foobar;
292 };
293 /** @bar2: Description for struct @bar2 inside @foo */
294 struct {
295 /**
296 * @bar2.barbar: Description for @barbar inside @foo.bar2
297 */
298 int barbar;
299 } bar2;
291 }; 300 };
292 301
293Typedef documentation 302Typedef documentation