From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbdLKQ36 (ORCPT ); Mon, 11 Dec 2017 11:29:58 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:48106 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751400AbdLKQ3y (ORCPT ); Mon, 11 Dec 2017 11:29:54 -0500 Subject: Re: [PATCH 13/13] arc: do not use __print_symbol() To: Sergey Senozhatsky , Andrew Morton , Russell King , "Catalin Marinas" , Mark Salter , "Tony Luck" , David Howells , "Yoshinori Sato" , Guan Xuetao , Borislav Petkov , Greg Kroah-Hartman , Thomas Gleixner , "Peter Zijlstra" , Vineet Gupta , Fengguang Wu CC: Steven Rostedt , Petr Mladek , LKML , "linux-arm-kernel@lists.infradead.org" , "linux-c6x-dev@linux-c6x.org" , "linux-ia64@vger.kernel.org" , "linux-am33-list@redhat.com" , "linux-sh@vger.kernel.org" , "linux-edac@vger.kernel.org" , "x86@kernel.org" , "linux-snps-arc@lists.infradead.org" , Sergey Senozhatsky References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> <20171211125025.2270-14-sergey.senozhatsky@gmail.com> From: Vineet Gupta Message-ID: <12708a61-ebc7-8f3f-cef6-4a725047de6d@synopsys.com> Date: Mon, 11 Dec 2017 08:28:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171211125025.2270-14-sergey.senozhatsky@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.10.161.67] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/11/2017 04:53 AM, Sergey Senozhatsky wrote: > __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 > Cc: Vineet Gupta Applied to arc for-curr Thx, -Vineet > --- > arch/arc/kernel/stacktrace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arc/kernel/stacktrace.c b/arch/arc/kernel/stacktrace.c > index 74315f302971..bf40e06f3fb8 100644 > --- a/arch/arc/kernel/stacktrace.c > +++ b/arch/arc/kernel/stacktrace.c > @@ -163,7 +163,7 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs, > */ > static int __print_sym(unsigned int address, void *unused) > { > - __print_symbol(" %s\n", address); > + printk(" %pS\n", (void *)address); > return 0; > } >