From patchwork Mon Dec 11 12:50:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10104969 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 88485602B3 for ; Mon, 11 Dec 2017 12:53:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E0F629587 for ; Mon, 11 Dec 2017 12:53:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52A4429589; Mon, 11 Dec 2017 12:53:36 +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 DA86629587 for ; Mon, 11 Dec 2017 12:53:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753067AbdLKMxX (ORCPT ); Mon, 11 Dec 2017 07:53:23 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36222 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753031AbdLKMxT (ORCPT ); Mon, 11 Dec 2017 07:53:19 -0500 Received: by mail-pf0-f196.google.com with SMTP id p84so11474776pfd.3; Mon, 11 Dec 2017 04:53:19 -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=25glu8cobH+QilVNicykgVBECyKeMy66h5rsG9hpxo8=; b=HUJQldHY4TvECxG9Sxz6dwGFDgTO2rGb9hk0z/+dY+fNoqX46kdBHPDswK0kyPX5jR H5APUiDLJNMTV9IWJougKpFF/DRyR31v6HiNJbQ+GY99Ya1fjqpQW9er9m3u2J8EYVOV 5IdT4aYBZzZhsUWMtU6s7FOEV3a4K3e235PDS1kPRTd9Be9RA5KPuv1EZ4YYSTsrkzY3 GYv6hNSM2mIfmqx2baUz+Ua4k2DnCnB4XcZ0DSog/NEEm92DkojnBFZzWhIRcsqky4pb UUCXoxsYfIeIw82RWbOQ6DFaCgzGukXVf2sDicsNiskAAKiJN8PvffBXM90rB5KPuKNS p6gg== 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=25glu8cobH+QilVNicykgVBECyKeMy66h5rsG9hpxo8=; b=sM/CT9ioI9X+nl3UzYGQn2eBkmxl5Grn82j6wi2obbd0f16Gcdt0fx/a0xfPqMwSVg hBnEC+2WD3cMhphhxwVchdchbAcebwuq619qLmo8er1FOhYn1eTthGSKLZ/SOWOUnVnY CRiHu4RxTiHouRcAA4yNj3xkndHErU6Bd5RjbRlqLDc+8KfwTNPxGg8rd9b+SbtM+98F nGt11J7OF4EFdQFJrqx9wEY5ksUW/nQtQMNhIxSwXd9xrnNLcen/vOs9masTuB1it/JF jUHqEwX+8GYHMo4jM/LMugVE3OPWizgMX2H3oD3vk3J2RbGnmV6feY/UPhiUt+vCwn4G +Bmg== X-Gm-Message-State: AKGB3mKOxu5SzA+fvNQN9bGc8dABsreadS5wEMIQocx+Iog17stGMoqM I3Q86VJgFgZsOvELrYGDzwc= X-Google-Smtp-Source: ACJfBosbiVFYks48hCkY1LVL8Phx0ei+jSWTNwDI9YapB6PWP/cm1Ypqwbp64XvWGCkHv0mSqmrCZg== X-Received: by 10.98.224.200 with SMTP id d69mr308419pfm.100.1512996799134; Mon, 11 Dec 2017 04:53:19 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.53.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:53:18 -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 13/13] arc: do not use __print_symbol() Date: Mon, 11 Dec 2017 21:50:25 +0900 Message-Id: <20171211125025.2270-14-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: Vineet Gupta --- 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; }