summaryrefslogtreecommitdiffstats
path: root/Documentation/doc-guide
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-18 07:30:03 -0500
committerJonathan Corbet <corbet@lwn.net>2017-12-21 15:41:45 -0500
commit01f2c18073e284397f45c94b26e65fd1b66776e4 (patch)
tree831c17c9f9c5d6f7d9f734d1781e16cceeb9a623 /Documentation/doc-guide
parent63ac85174a5455bf0ed14fa37515015de33d0fe9 (diff)
docs: kernel-doc.rst: improve private members description
The private members section can now be moved to be together with the arguments section. Move it there and add an example about the usage of public: 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.rst56
1 files changed, 30 insertions, 26 deletions
diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst
index f1c03c16f03b..7cf58c3489de 100644
--- a/Documentation/doc-guide/kernel-doc.rst
+++ b/Documentation/doc-guide/kernel-doc.rst
@@ -167,6 +167,36 @@ notation as::
167 167
168 * @...: description 168 * @...: description
169 169
170Private members
171~~~~~~~~~~~~~~~
172
173Inside a struct or union description, you can use the ``private:`` and
174``public:`` comment tags. Structure fields that are inside a ``private:``
175area are not listed in the generated output documentation.
176
177The ``private:`` and ``public:`` tags must begin immediately following a
178``/*`` comment marker. They may optionally include comments between the
179``:`` and the ending ``*/`` marker.
180
181Example::
182
183 /**
184 * struct my_struct - short description
185 * @a: first member
186 * @b: second member
187 * @d: fourth member
188 *
189 * Longer description
190 */
191 struct my_struct {
192 int a;
193 int b;
194 /* private: internal use only */
195 int c;
196 /* public: the next one is public */
197 int d;
198 };
199
170 200
171Highlights and cross-references 201Highlights and cross-references
172------------------------------- 202-------------------------------
@@ -332,32 +362,6 @@ on a line of their own, like all other kernel-doc comments::
332 int foobar; 362 int foobar;
333 } 363 }
334 364
335Private members
336~~~~~~~~~~~~~~~
337
338Inside a struct description, you can use the "private:" and "public:" comment
339tags. Structure fields that are inside a "private:" area are not listed in the
340generated output documentation. The "private:" and "public:" tags must begin
341immediately following a ``/*`` comment marker. They may optionally include
342comments between the ``:`` and the ending ``*/`` marker.
343
344Example::
345
346 /**
347 * struct my_struct - short description
348 * @a: first member
349 * @b: second member
350 *
351 * Longer description
352 */
353 struct my_struct {
354 int a;
355 int b;
356 /* private: internal use only */
357 int c;
358 };
359
360
361Typedef documentation 365Typedef documentation
362--------------------- 366---------------------
363 367