Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232090
| From | Martin Kletzander <mkletzan@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] lib: Documentation: Synchronize %p formatting documentation |
| Date | 2015-09-24 14:40 +0200 |
| Message-ID | <qcdYC-36h-1@gated-at.bofh.it> (permalink) |
| References | <qc9Lk-5Dv-11@gated-at.bofh.it> <qc9V0-5OU-19@gated-at.bofh.it> <qca4G-60q-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Thu, Sep 24, 2015 at 08:20:27AM +0000, Shevchenko, Andriy wrote: >On Thu, 2015-09-24 at 11:16 +0300, Andy Shevchenko wrote: >> On Thu, 2015-09-24 at 10:08 +0200, Martin Kletzander wrote: >> > Move all pointer-formatting documentation to one place in the code >> > and >> > one place in the documentation instead of keeping it in three >> > places >> > with different level of completeness. Documentation/printk >> > -formats.txt >> > has detailed information about each modifier, docstring above >> > pointer() >> > has short descriptions of them (as that is the function dealing >> > with >> > %p) >> > and docstring above vsprintf() is removed as redundant. Both >> > docstrings >> > in the code that were modified are updated with a reminder of >> > updating >> > the documentation upon any further change. >> > >> >> Good for me! >> >> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> >> > >Ah, sorry, it seems you have to distinguish %pn (which seems now as %p >+ n if I didn't miss anything) and %n. > Sorry, my bad, thanks for catching that. >After addressing this, take my above tag. > I added few more tiny fixes (see diff below), is it still OK for me to add the Reviewed-by there? Martin diff --git i/Documentation/printk-formats.txt w/Documentation/printk-formats.txt index c85e27264a2b..f6d1ab6b1165 100644 --- i/Documentation/printk-formats.txt +++ w/Documentation/printk-formats.txt @@ -315,9 +315,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 i/lib/vsprintf.c w/lib/vsprintf.c index 07205016415d..3e66fbbae8cd 100644 --- i/lib/vsprintf.c +++ w/lib/vsprintf.c @@ -1465,7 +1465,7 @@ int kptr_restrict __read_mostly; * - 'Cr' For a clock, it prints the current rate of the clock * - 'T' For task_struct->comm * - * ** 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 @@ -1831,11 +1831,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 --
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] lib: Documentation: Synchronize %p formatting documentation Martin Kletzander <mkletzan@redhat.com> - 2015-09-24 10:10 +0200
Re: [PATCH v2] lib: Documentation: Synchronize %p formatting documentation Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-09-24 10:20 +0200
Re: [PATCH v2] lib: Documentation: Synchronize %p formatting documentation "Shevchenko, Andriy" <andriy.shevchenko@intel.com> - 2015-09-24 10:30 +0200
Re: [PATCH v2] lib: Documentation: Synchronize %p formatting documentation Martin Kletzander <mkletzan@redhat.com> - 2015-09-24 14:40 +0200
csiph-web