aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt37
1 files changed, 33 insertions, 4 deletions
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index 6ca507f40749..2075c0658bf5 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -107,10 +107,14 @@ The format of the block comment is like this:
107 * (section header: (section description)? )* 107 * (section header: (section description)? )*
108(*)?*/ 108(*)?*/
109 109
110The short function description cannot be multiline, but the other 110The short function description ***cannot be multiline***, but the other
111descriptions can be (and they can contain blank lines). Avoid putting a 111descriptions can be (and they can contain blank lines). If you continue
112spurious blank line after the function name, or else the description will 112that initial short description onto a second line, that second line will
113be repeated! 113appear further down at the beginning of the description section, which is
114almost certainly not what you had in mind.
115
116Avoid putting a spurious blank line after the function name, or else the
117description will be repeated!
114 118
115All descriptive text is further processed, scanning for the following special 119All descriptive text is further processed, scanning for the following special
116patterns, which are highlighted appropriately. 120patterns, which are highlighted appropriately.
@@ -121,6 +125,31 @@ patterns, which are highlighted appropriately.
121'@parameter' - name of a parameter 125'@parameter' - name of a parameter
122'%CONST' - name of a constant. 126'%CONST' - name of a constant.
123 127
128NOTE 1: The multi-line descriptive text you provide does *not* recognize
129line breaks, so if you try to format some text nicely, as in:
130
131 Return codes
132 0 - cool
133 1 - invalid arg
134 2 - out of memory
135
136this will all run together and produce:
137
138 Return codes 0 - cool 1 - invalid arg 2 - out of memory
139
140NOTE 2: If the descriptive text you provide has lines that begin with
141some phrase followed by a colon, each of those phrases will be taken as
142a new section heading, which means you should similarly try to avoid text
143like:
144
145 Return codes:
146 0: cool
147 1: invalid arg
148 2: out of memory
149
150every line of which would start a new section. Again, probably not
151what you were after.
152
124Take a look around the source tree for examples. 153Take a look around the source tree for examples.
125 154
126 155