Commit dbcce2bf authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet
Browse files

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: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent fe7bc493
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -286,9 +286,18 @@ on a line of their own, like all other kernel-doc comments::
         * Here, the member description may contain several paragraphs.
         */
        int baz;
        union {
                /** @foobar: Single line description. */
                int foobar;
        };
        /** @bar2: Description for struct @bar2 inside @foo */
        struct {
                /**
                 * @bar2.barbar: Description for @barbar inside @foo.bar2
                 */
                int barbar;
        } bar2;
  };

Typedef documentation
---------------------