]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
printk-formats.txt: Add examples for %pF and %pS usage
authorHelge Deller <deller@gmx.de>
Wed, 23 Aug 2017 19:52:05 +0000 (21:52 +0200)
committerHelge Deller <deller@gmx.de>
Thu, 24 Aug 2017 16:49:52 +0000 (18:49 +0200)
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Documentation/printk-formats.txt

index 074670b98bac784c27eecc18f672b2f1ad24f489..361789df51ecf58d5083436792588d2f12faa7f2 100644 (file)
@@ -75,6 +75,16 @@ used when printing stack backtraces. The specifier takes into
 consideration the effect of compiler optimisations which may occur
 when tail-call``s are used and marked with the noreturn GCC attribute.
 
+Examples::
+
+       printk("Going to call: %pF\n", gettimeofday);
+       printk("Going to call: %pF\n", p->func);
+       printk("%s: called from %pS\n", __func__, (void *)_RET_IP_);
+       printk("%s: called from %pS\n", __func__,
+                               (void *)__builtin_return_address(0));
+       printk("Faulted at %pS\n", (void *)regs->ip);
+       printk(" %s%pB\n", (reliable ? "" : "? "), (void *)*stack);
+
 
 Kernel Pointers
 ===============