From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755081AbbIXMhW (ORCPT ); Thu, 24 Sep 2015 08:37:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57632 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754248AbbIXMhU (ORCPT ); Thu, 24 Sep 2015 08:37:20 -0400 Date: Thu, 24 Sep 2015 14:37:17 +0200 From: Martin Kletzander To: "Shevchenko, Andriy" Cc: "linux-doc@vger.kernel.org" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "keescook@chromium.org" , "linux@rasmusvillemoes.dk" , "penguin-kernel@i-love.sakura.ne.jp" , "akpm@linux-foundation.org" , "geert+renesas@glider.be" , "tj@kernel.org" , "sboyd@codeaurora.org" Subject: Re: [PATCH v2] lib: Documentation: Synchronize %p formatting documentation Message-ID: <20150924123717.GA1611@wheatley> References: <7e9387672bca3e6b336dcf20df5fba5531c33566.1443081807.git.mkletzan@redhat.com> <1443082601.8361.185.camel@linux.intel.com> <1443082825.8361.187.camel@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <1443082825.8361.187.camel@intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline 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 >> > >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 -- --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWA+59AAoJEAgfwp8kF4bd78oP/2B4PUqJaB0WaBxPoYAhDPgE lghMzFcmMvniWeDypN5AqkzUKWDe9NI7mdV/7F8Vg08Usrhuyts0+9TB5vWBlZ9X OhrS96xocjtxGChDeN+RL/fvG8ACgjoHhNm7rLVe79IB0ch948Grl3Gon+EMHuhA CLmdK81S1l3srNFI+jk64h5sdXuSsADo9cCH3TeiYyeEVsuRGWE11EJ7+CSGLjx/ aFVsKxcw7qdZfZkZtT1pf6NItBmsOJm/wRQK7KI6Asb3JzQzI7ibLH8g2c86P+uZ Pf+tYe/JUJmljVmmMwXiCmx45TerPJ+KZeHGTmkULgCxPzW1nokniC4JtS15T4um 9kmDlfHOL8fNRBq3TXMPWCeHVYkyejtgRXgNOLZlxhsPAXof5TYMUprEPl7/RG6X UjuEMLvFZsno0WZwHX5u6oqgXmFfhYWCDqFCKJg9ExwkYmw6dlNXQ6sWGJf1BDgO 13AE7dX2X4hwjBce/4Z+ZCoTPL3HGtbNGTuAU6Fnuq26s+gbN0VoZnoOccy6Bwzi aq2syo0kP/1YiG8rzOyIgxa5V1fsJYnDLNYV8oeyFhs85+Yq/sr+QZcGMo0Z73PF PQTHGdMONlgNaR5ETsdpobSHBclS37/XfIW08hCs5JzVhvcBoON4l2D6fE7DgcCF YhWjRjXOcZgLBDY0RcA1 =kNet -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--