All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Kletzander <mkletzan@redhat.com>
To: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
Cc: "linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"linux@rasmusvillemoes.dk" <linux@rasmusvillemoes.dk>,
	"penguin-kernel@i-love.sakura.ne.jp" 
	<penguin-kernel@i-love.sakura.ne.jp>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	"tj@kernel.org" <tj@kernel.org>,
	"sboyd@codeaurora.org" <sboyd@codeaurora.org>
Subject: Re: [PATCH v2] lib: Documentation: Synchronize %p formatting documentation
Date: Thu, 24 Sep 2015 14:37:17 +0200	[thread overview]
Message-ID: <20150924123717.GA1611@wheatley> (raw)
In-Reply-To: <1443082825.8361.187.camel@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3097 bytes --]

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
--

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-09-24 12:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24  8:08 [PATCH v2] lib: Documentation: Synchronize %p formatting documentation Martin Kletzander
2015-09-24  8:16 ` Andy Shevchenko
2015-09-24  8:20   ` Shevchenko, Andriy
2015-09-24 12:37     ` Martin Kletzander [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150924123717.GA1611@wheatley \
    --to=mkletzan@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=corbet@lwn.net \
    --cc=geert+renesas@glider.be \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=sboyd@codeaurora.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.