diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-04-15 19:17:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:23 -0400 |
commit | 7330660ed2e8d8d4c65b90cea62d8f1ed49c0104 (patch) | |
tree | bb7a2a8a7d4670037da7e669f534a12a3a3cfaf2 /Documentation/printk-formats.txt | |
parent | d1c1b12137fff14363d0cf45c8b7a9ec5cd4578b (diff) |
lib/vsprintf: document %p parameters passed by reference
This patch series improves the documentation for printk() formats, and
adds support for printing clocks. The latter has always been a hassle if
you wanted to support both the common and legacy clock frameworks.
- '%pC' and '%pCn' print the name (Common Clock Framework) or address
(legacy clock framework) of a clock,
- '%pCr' prints the current clock rate.
This patch (of 3):
Make sure all %p extensions that take parameters by references are
documented to do so.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/printk-formats.txt')
-rw-r--r-- | Documentation/printk-formats.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 5a615c14f75d..71438f3eb0c0 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
@@ -54,6 +54,7 @@ Struct Resources: | |||
54 | 54 | ||
55 | For printing struct resources. The 'R' and 'r' specifiers result in a | 55 | For printing struct resources. The 'R' and 'r' specifiers result in a |
56 | printed resource with ('R') or without ('r') a decoded flags member. | 56 | printed resource with ('R') or without ('r') a decoded flags member. |
57 | Passed by reference. | ||
57 | 58 | ||
58 | Physical addresses types phys_addr_t: | 59 | Physical addresses types phys_addr_t: |
59 | 60 | ||
@@ -132,6 +133,8 @@ MAC/FDDI addresses: | |||
132 | specifier to use reversed byte order suitable for visual interpretation | 133 | specifier to use reversed byte order suitable for visual interpretation |
133 | of Bluetooth addresses which are in the little endian order. | 134 | of Bluetooth addresses which are in the little endian order. |
134 | 135 | ||
136 | Passed by reference. | ||
137 | |||
135 | IPv4 addresses: | 138 | IPv4 addresses: |
136 | 139 | ||
137 | %pI4 1.2.3.4 | 140 | %pI4 1.2.3.4 |
@@ -146,6 +149,8 @@ IPv4 addresses: | |||
146 | host, network, big or little endian order addresses respectively. Where | 149 | host, network, big or little endian order addresses respectively. Where |
147 | no specifier is provided the default network/big endian order is used. | 150 | no specifier is provided the default network/big endian order is used. |
148 | 151 | ||
152 | Passed by reference. | ||
153 | |||
149 | IPv6 addresses: | 154 | IPv6 addresses: |
150 | 155 | ||
151 | %pI6 0001:0002:0003:0004:0005:0006:0007:0008 | 156 | %pI6 0001:0002:0003:0004:0005:0006:0007:0008 |
@@ -160,6 +165,8 @@ IPv6 addresses: | |||
160 | print a compressed IPv6 address as described by | 165 | print a compressed IPv6 address as described by |
161 | http://tools.ietf.org/html/rfc5952 | 166 | http://tools.ietf.org/html/rfc5952 |
162 | 167 | ||
168 | Passed by reference. | ||
169 | |||
163 | IPv4/IPv6 addresses (generic, with port, flowinfo, scope): | 170 | IPv4/IPv6 addresses (generic, with port, flowinfo, scope): |
164 | 171 | ||
165 | %pIS 1.2.3.4 or 0001:0002:0003:0004:0005:0006:0007:0008 | 172 | %pIS 1.2.3.4 or 0001:0002:0003:0004:0005:0006:0007:0008 |
@@ -186,6 +193,8 @@ IPv4/IPv6 addresses (generic, with port, flowinfo, scope): | |||
186 | specifiers can be used as well and are ignored in case of an IPv6 | 193 | specifiers can be used as well and are ignored in case of an IPv6 |
187 | address. | 194 | address. |
188 | 195 | ||
196 | Passed by reference. | ||
197 | |||
189 | Further examples: | 198 | Further examples: |
190 | 199 | ||
191 | %pISfc 1.2.3.4 or [1:2:3:4:5:6:7:8]/123456789 | 200 | %pISfc 1.2.3.4 or [1:2:3:4:5:6:7:8]/123456789 |
@@ -207,6 +216,8 @@ UUID/GUID addresses: | |||
207 | Where no additional specifiers are used the default little endian | 216 | Where no additional specifiers are used the default little endian |
208 | order with lower case hex characters will be printed. | 217 | order with lower case hex characters will be printed. |
209 | 218 | ||
219 | Passed by reference. | ||
220 | |||
210 | dentry names: | 221 | dentry names: |
211 | %pd{,2,3,4} | 222 | %pd{,2,3,4} |
212 | %pD{,2,3,4} | 223 | %pD{,2,3,4} |
@@ -216,6 +227,8 @@ dentry names: | |||
216 | equivalent of %s dentry->d_name.name we used to use, %pd<n> prints | 227 | equivalent of %s dentry->d_name.name we used to use, %pd<n> prints |
217 | n last components. %pD does the same thing for struct file. | 228 | n last components. %pD does the same thing for struct file. |
218 | 229 | ||
230 | Passed by reference. | ||
231 | |||
219 | struct va_format: | 232 | struct va_format: |
220 | 233 | ||
221 | %pV | 234 | %pV |
@@ -231,6 +244,8 @@ struct va_format: | |||
231 | Do not use this feature without some mechanism to verify the | 244 | Do not use this feature without some mechanism to verify the |
232 | correctness of the format string and va_list arguments. | 245 | correctness of the format string and va_list arguments. |
233 | 246 | ||
247 | Passed by reference. | ||
248 | |||
234 | u64 SHOULD be printed with %llu/%llx: | 249 | u64 SHOULD be printed with %llu/%llx: |
235 | 250 | ||
236 | printk("%llu", u64_var); | 251 | printk("%llu", u64_var); |