diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-18 07:30:06 -0500 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2017-12-21 15:41:46 -0500 |
commit | bdb76f9e305a45a7a1f0073a4b3a0fae9900bf97 (patch) | |
tree | 7bcf3211600080b363096334f2553f851dad1ba6 | |
parent | 553aa3c12e818a142e493a3d44a1eb8cadc2959f (diff) |
docs: kernel-doc.rst: improve typedef documentation
Add documentation about typedefs for function prototypes and
move it to happen earlier.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r-- | Documentation/doc-guide/kernel-doc.rst | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/Documentation/doc-guide/kernel-doc.rst b/Documentation/doc-guide/kernel-doc.rst index e3e82f8f4de5..b178857866f8 100644 --- a/Documentation/doc-guide/kernel-doc.rst +++ b/Documentation/doc-guide/kernel-doc.rst | |||
@@ -282,6 +282,28 @@ The kernel-doc data structure comments describe each member of the structure, | |||
282 | in order, with the member descriptions. | 282 | in order, with the member descriptions. |
283 | 283 | ||
284 | 284 | ||
285 | Typedef documentation | ||
286 | --------------------- | ||
287 | |||
288 | The general format of a typedef kernel-doc comment is:: | ||
289 | |||
290 | /** | ||
291 | * typedef type_name - Brief description. | ||
292 | * | ||
293 | * Description of the type. | ||
294 | */ | ||
295 | |||
296 | Typedefs with function prototypes can also be documented:: | ||
297 | |||
298 | /** | ||
299 | * typedef type_name - Brief description. | ||
300 | * @arg1: description of arg1 | ||
301 | * @arg2: description of arg2 | ||
302 | * | ||
303 | * Description of the type. | ||
304 | */ | ||
305 | typedef void (*type_name)(struct v4l2_ctrl *arg1, void *arg2); | ||
306 | |||
285 | 307 | ||
286 | Highlights and cross-references | 308 | Highlights and cross-references |
287 | ------------------------------- | 309 | ------------------------------- |
@@ -384,16 +406,6 @@ on a line of their own, like all other kernel-doc comments:: | |||
384 | int foobar; | 406 | int foobar; |
385 | } | 407 | } |
386 | 408 | ||
387 | Typedef documentation | ||
388 | --------------------- | ||
389 | |||
390 | The general format of a typedef kernel-doc comment is:: | ||
391 | |||
392 | /** | ||
393 | * typedef type_name - Brief description. | ||
394 | * | ||
395 | * Description of the type. | ||
396 | */ | ||
397 | 409 | ||
398 | Overview documentation comments | 410 | Overview documentation comments |
399 | ------------------------------- | 411 | ------------------------------- |