[PATCH 12/13] lib: do not use print_symbol()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Mark Salter <msalter@xxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxxxx>, Fengguang Wu <fengguang.wu@xxxxxxxxx>
- Subject: [PATCH 12/13] lib: do not use print_symbol()
- From: Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>
- Date: Mon, 11 Dec 2017 21:50:24 +0900
- Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-am33-list@xxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>, Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
- In-reply-to: <20171211125025.2270-1-sergey.senozhatsky@gmail.com>
- References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com>
print_symbol() uses extra stack space to sprintf() symbol
information and then to feed that buffer to printk()
char buffer[KSYM_SYMBOL_LEN];
sprint_symbol(buffer, address);
printk(fmt, buffer);
Replace print_symbol() with a direct printk("%pS") call.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
lib/smp_processor_id.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 835cc6df2776..85925aaa4fff 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -5,7 +5,6 @@
* DEBUG_PREEMPT variant of smp_processor_id().
*/
#include <linux/export.h>
-#include <linux/kallsyms.h>
#include <linux/sched.h>
notrace static unsigned int check_preemption_disabled(const char *what1,
@@ -43,7 +42,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
printk(KERN_ERR "BUG: using %s%s() in preemptible [%08x] code: %s/%d\n",
what1, what2, preempt_count() - 1, current->comm, current->pid);
- print_symbol("caller is %s\n", (long)__builtin_return_address(0));
+ printk("caller is %pS\n", __builtin_return_address(0));
dump_stack();
out_enable:
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]