From: Martin Kletzander Date: Wed, 21 Oct 2015 22:03:49 +0000 (+1100) Subject: lib-documentation-synchronize-%p-formatting-documentation-fix X-Git-Tag: KARO-TX6UL-2015-11-03~14^2~64 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9e86f101056dc9c3ef6ef3e49a7c74dc860d4cf1;p=karo-tx-linux.git lib-documentation-synchronize-%p-formatting-documentation-fix Cc: Andy Shevchenko Cc: Rasmus Villemoes Cc: Jonathan Corbet Signed-off-by: Andrew Morton --- diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index ce1556c06d8f..9b8d7f746b1a 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@ -307,9 +307,11 @@ Command from struct task_struct Ignored argument: - %pn + %n %n - The argument passed will be ignored. + The argument passed will be ignored. In other words, literal "%n" will + be in the output and the argument will be considered for next format + specifier. Thank you for your cooperation and attention. diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 6b8375c0b946..5028b044d0e5 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1450,7 +1450,7 @@ int kptr_restrict __read_mostly; * - 'Cr' For a clock, it prints the current rate of the clock * - 'n' For ignored argument * - * ** Please update Documentation/printk-formats.txt when making changes ** + * ** Please update also Documentation/printk-formats.txt when making changes ** * * Note: The difference between 'S' and 'F' is that on ia64 and ppc64 * function pointers are really function descriptors, which contain a @@ -1814,11 +1814,14 @@ qualifier: * @fmt: The format string to use * @args: Arguments for the format string * - * This function follows C99 vsnprintf, but has some extensions. See - * pointer() or Documentation/printk-formats.txt for all format - * specifiers. + * This function follows C99 vsnprintf, but has some extensions: + * %n is ignored + * %p* is handled by pointer() + * + * See pointer() or Documentation/printk-formats.txt for more + * extensive description. * - * ** Please update the documentation when making changes ** + * ** Please update the documentation on both places when making changes ** * * The return value is the number of characters which would * be generated for the given input, excluding the trailing