From patchwork Mon Dec 11 12:50:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10104979 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 B7E96602B3 for ; Mon, 11 Dec 2017 12:53:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CB0C29587 for ; Mon, 11 Dec 2017 12:53:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8110729589; Mon, 11 Dec 2017 12:53:52 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 058BD29587 for ; Mon, 11 Dec 2017 12:53:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999AbdLKMwM (ORCPT ); Mon, 11 Dec 2017 07:52:12 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35115 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753133AbdLKMwI (ORCPT ); Mon, 11 Dec 2017 07:52:08 -0500 Received: by mail-pg0-f67.google.com with SMTP id q20so10860145pgv.2; Mon, 11 Dec 2017 04:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=elYZJDsSm2wC0PAmPNh/cIruE7J5aB74Mj8hAWUrV7o=; b=lDusNyUGioNcGCWrrWlcsjOnuesbSF43p2m2YkTDwZs3LetRDrSjNkPSUBqFVtTmPs Mclr3VGYiEaEnwXkJbcEWEWPlBLhHujTLjd7ScldJcH2c6f4Y2yjczZIsn6Mf3LIHmG+ pJ4b5BHQ9p7CorBlFwkN0xifztEjKaDN/XQtrlaxSOjzPkgiocZOnzCjc4SwrFZUAihe ZaFCgSpiQ3KHpOR2whVLSzQKb9md+Bx4+v0jjmbvJho19nc902J630DG7BEOQcAx/z/6 oideuCsxIN7OpBxUjsvBIa52rYHCLnpM71dJLs42t4E7WB1bPotHq+Gf4sNfIkpH++10 7ALA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=elYZJDsSm2wC0PAmPNh/cIruE7J5aB74Mj8hAWUrV7o=; b=bQmt/saU8Wp4eYd6Z9pwzt9jMfz0lmp0Vvnh0tI3ZDm9fRU/s6oW4nXhR5hsUSlCuF +vn0a3/mjnB7s0hihqpMjnLfBgG+E3y2VJGXDFOm+apQRHm3gx0vQ6sp0LKFr2iodeGB yC6K546K7Gimm4lttX+JUziEtlnLeRz7K7wplq8SVJGSV1MPEMl0p6pZazhXcKCWwFqr wljT00OUZ/2Edtbna/AQ4d6yQRgcPDpU2eqUijj/CAzdXajwL/GuwrRH7QUV0yNu7ACQ 77QdfgpXu0pNS/ioSCRCh7i5YbgTJjsxmt8Z3+ScRoxKwsoiGEbm1E7/gFSoV3vAJA/F In7A== X-Gm-Message-State: AKGB3mIgcJIWhOtxtJi012XwQ6HRmVwPzvLpX7ijMvdeMZXBcsqba3Bb GgT4vYNZdRuwFPkc/S30I/U= X-Google-Smtp-Source: ACJfBotqEOIc8GqhOWvpUJ1KdEnO9FF6MIE+m3szetK7DMAvzriRJLNTl9oAWuBFnImE5A5NOq7w6g== X-Received: by 10.101.78.203 with SMTP id w11mr223784pgq.439.1512996727513; Mon, 11 Dec 2017 04:52:07 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.51.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:52:06 -0800 (PST) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky To: 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 , Sergey Senozhatsky Subject: [PATCH 07/13] unicore32: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:19 +0900 Message-Id: <20171211125025.2270-8-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Guan Xuetao --- arch/unicore32/kernel/process.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c index ddaf78ae6854..9a9d49bccc02 100644 --- a/arch/unicore32/kernel/process.c +++ b/arch/unicore32/kernel/process.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -139,8 +138,8 @@ void __show_regs(struct pt_regs *regs) char buf[64]; show_regs_print_info(KERN_DEFAULT); - print_symbol("PC is at %s\n", instruction_pointer(regs)); - print_symbol("LR is at %s\n", regs->UCreg_lr); + printk("PC is at %pS\n", instruction_pointer(regs)); + printk("LR is at %pS\n", (void *)regs->UCreg_lr); printk(KERN_DEFAULT "pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n" "sp : %08lx ip : %08lx fp : %08lx\n", regs->UCreg_pc, regs->UCreg_lr, regs->UCreg_asr,