From patchwork Thu Aug 10 17:35:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9894391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2733460348 for ; Thu, 10 Aug 2017 17:36:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1152A2881E for ; Thu, 10 Aug 2017 17:36:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0617F28A93; Thu, 10 Aug 2017 17:36:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 768482881E for ; Thu, 10 Aug 2017 17:36:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752612AbdHJRgT (ORCPT ); Thu, 10 Aug 2017 13:36:19 -0400 Received: from mout.gmx.net ([212.227.15.19]:50508 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbdHJRgS (ORCPT ); Thu, 10 Aug 2017 13:36:18 -0400 Received: from ls3530.fritz.box ([193.159.17.217]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M8NBi-1dT7wg3bDm-00vy0P; Thu, 10 Aug 2017 19:35:36 +0200 Date: Thu, 10 Aug 2017 19:35:33 +0200 From: Helge Deller To: Petr Mladek , Sergey Senozhatsky , Steven Rostedt , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org Subject: [PATCH] printk-formats.txt: Add examples for %pS and %pF Message-ID: <20170810173533.GA11600@ls3530.fritz.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) X-Provags-ID: V03:K0:zybg+flPus7ba1l1sDC9JleJoXO0qkyf4jgYzZM3Wmdv9ou4SEa //Tpe4XS2R1AcQN75Oof7GbBfWX75XRQJDcAUt+NXHPWkmqbVAwwp6RR7qyZnmfuXHyIELp htY3nrgw0wWZVewU/p1fCGVSeR635cpyRX7iL8TdX/KYQU8BvFx9o6TnskktFec7WRGzTml aIy59AtMBhBF3SJvQQ5CQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:4XLTJOu6wxg=:C1KGjiHVvrQE9qUHUhTBI5 f8Zb6zUXkQ83gIL/ugVOE4smH15vSHzTfOQFE5q2Tu/6zgilG4EDv7sU5U0gFE+hY/UAt6qHR QWkxOkxb+BKDc1mP416A9J7cYgve1eA4lIZu86O9tEO135XVN1Mur4/5PfXITVRnVDq2/aeWZ n2DgUAqsUWKGlxhX6vbvZLF5d01m+RmGfeVV4wHmCI/vqtpPHlf5+2RegBhBohpuZWsH5+w55 GwCa18sbysdG6vTPQ7DCUiuOR9rFQ5mrVf3+ZprRoX5EaC8w8/pqL/Qj0SjbhH2SkmNr9HojP 2CFB10vVPXC0ApOOloJUHVb6+d+zNu7xWtqygux5D3SL/C8Wu302xu46rhPwgMcrzxL+Vp3zq /CYbJ4zmNzHRZFGTRWQ1KDUE8T8ZYo0O3W20NKrG4GHUQrqaSLCRpBnHt9aCdYpcPRaQ5xXMy u5KWtFD9d7fbU62NVdEpmkW35JNlK6OHDKaqdYMOU0/ikKlzxEPYYBlQFMPNGrIfFHVam69YG n1bhfWvMpzkI310uaW9x1ub+PBq13sDV9NgOeILd9FQbWgz9gWl0LD9DIVMC/oxgSWefqIf5u nTEPWFQdaceVdA9SzodkvrUl7JLwvdxB40o8EpO0Y8A4ELl4+RezilslV7FizulncqUtxQCb+ E2rwSI1nTekjEmEZfNPyiri9s2SZ9YFcKybwhpRDrTP226nZ3Et4cDZnBtgAvit9NTXYpgw5m OI6x/gTY8Hpmqc4GK5eM8NqyMkfm7UVvHkxqe9bEgifOJ79+wGJmchcARLJGDRzeS1fObbX8q vR9Zn/1u9hYVNzbtFknyWPIWM+yNQ== Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sometimes people seems unclear when to use the %pS or %pF printk format. Adding some examples may help to avoid such mistakes. See for example commit 51d96dc2e2dc ("random: fix warning message on ia64 and parisc") which fixed such a wrong format string. Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 65ea591..be8c05b 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@ -73,6 +73,12 @@ actually function descriptors which must first be resolved. The ``F`` and ``f`` specifiers perform this resolution and then provide the same functionality as the ``S`` and ``s`` specifiers. +Examples:: + + printk("Called from %pS.\n", __builtin_return_address(0)); + printk("Called from %pS.\n", (void *)regs->ip); + printk("Called from %pF.\n", &gettimeofday); + Kernel Pointers ===============