From patchwork Mon Dec 11 12:50:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10104939 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 039B3602B3 for ; Mon, 11 Dec 2017 12:52:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD25229583 for ; Mon, 11 Dec 2017 12:52:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C200D29585; Mon, 11 Dec 2017 12:52:01 +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 6720E29583 for ; Mon, 11 Dec 2017 12:52:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753092AbdLKMwA (ORCPT ); Mon, 11 Dec 2017 07:52:00 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37721 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752761AbdLKMv4 (ORCPT ); Mon, 11 Dec 2017 07:51:56 -0500 Received: by mail-pg0-f68.google.com with SMTP id y6so10853097pgp.4; Mon, 11 Dec 2017 04:51:55 -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=KrWSHlOYopSeKywswoL6bmz5Brm50fKGfd3eB+CdwVY=; b=DBHWNDoZOUB1d7kIWc0AFazro9/1nGadRXwfcP5MAkABrWccc01oHeJM0tDo3NC4EQ KxvyBeByJDwyjM3r6Un2oa9yAN6dgbESujgGXxtvWqxZiOOYp4Djkne8cNScBKK4e7az ufYOgI0D4xP+wkbomflGLMoph9yDd99bBGus1yJ/128PqNsbVuz+Gs1+tDkaMC8NctiP KQkFBjf4QnhpTti+pB7D4065+qdx2R/LoFSXAYqCgygE8mnlkPJncx8FYEhB2UsfrtVF SipbcZFLrAirDboCqPPf4rPGo5azTTm8hrrGHBGBoeu1QKkY7bWzOWdhHCwZh3Y7gdSg XHYQ== 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=KrWSHlOYopSeKywswoL6bmz5Brm50fKGfd3eB+CdwVY=; b=Qu3Z90DMLlLi9bB48sYArFJZgoFvL63XLc0HimHsqqETPMxj3MqDZFayM/pSrq0WIL d+Hlxm+8U6v05M1w4+dqx9ishM/7iJWq5aiO9sPlxeVOYmcyT/nWYjejY8k6SZlF8gx4 kVJ7BNtRSrvcbp3POaYLhCizerAU8e5d2EGwqZF8VTmfee65zpHoOHcEXK2nxgj5j3/u zbtBpj1lzv55RFVdGfC52zCSLLWKz7KRBR6i02MJ1uHX8qJJ4WOcDf4ICVe+kl19nfZb F586zxtejQQ0LIogiIPqwyQFzj+WAPO6FjaeD3akrMj/fjBF2BVUwR/ASXSFeBRsI5Tt WHig== X-Gm-Message-State: AKGB3mIAkODHgT+10kal7XxX8mbYbeI3PCfUjDBykclfDI9ph3eiHFgu 0JXQzQ5GYCN2ohqTrbOW998= X-Google-Smtp-Source: ACJfBov5UBStqay+snSsT449dOQq2nrRvo6YYBFabYTCDwfzmR4cRpdoNg6eY+50fjJE2VnIwUZFCA== X-Received: by 10.98.21.17 with SMTP id 17mr300026pfv.120.1512996715320; Mon, 11 Dec 2017 04:51:55 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.51.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:51:54 -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 , Rich Felker Subject: [PATCH 06/13] sh: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:18 +0900 Message-Id: <20171211125025.2270-7-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: Yoshinori Sato Cc: Rich Felker --- arch/sh/kernel/process_32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 2c7bdf8cb934..5c88e7cb9c18 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -37,8 +36,8 @@ void show_regs(struct pt_regs * regs) printk("\n"); show_regs_print_info(KERN_DEFAULT); - print_symbol("PC is at %s\n", instruction_pointer(regs)); - print_symbol("PR is at %s\n", regs->pr); + printk("PC is at %pS\n", instruction_pointer(regs)); + printk("PR is at %pS\n", (void *)regs->pr); printk("PC : %08lx SP : %08lx SR : %08lx ", regs->pc, regs->regs[15], regs->sr);