Skip to content

Commit fd46cd5

Browse files
committed
printk-formats.txt: Add examples for %pF and %pS usage
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>
1 parent d81f734 commit fd46cd5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎Documentation/printk-formats.txt‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ used when printing stack backtraces. The specifier takes into
7575
consideration the effect of compiler optimisations which may occur
7676
when tail-call``s are used and marked with the noreturn GCC attribute.
7777

78+
Examples::
79+
80+
printk("Going to call: %pF\n", gettimeofday);
81+
printk("Going to call: %pF\n", p->func);
82+
printk("%s: called from %pS\n", __func__, (void *)_RET_IP_);
83+
printk("%s: called from %pS\n", __func__,
84+
(void *)__builtin_return_address(0));
85+
printk("Faulted at %pS\n", (void *)regs->ip);
86+
printk(" %s%pB\n", (reliable ? "" : "? "), (void *)*stack);
87+
7888

7989
Kernel Pointers
8090
===============

0 commit comments

Comments
 (0)