From patchwork Mon Dec 11 12:50:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10104981 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 10183602B3 for ; Mon, 11 Dec 2017 12:53:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D91CA29587 for ; Mon, 11 Dec 2017 12:53:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE05329589; Mon, 11 Dec 2017 12:53:57 +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 7ACD629587 for ; Mon, 11 Dec 2017 12:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753109AbdLKMvs (ORCPT ); Mon, 11 Dec 2017 07:51:48 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:38182 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753092AbdLKMvo (ORCPT ); Mon, 11 Dec 2017 07:51:44 -0500 Received: by mail-pf0-f194.google.com with SMTP id u25so11468255pfg.5; Mon, 11 Dec 2017 04:51:44 -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=ACo0+eJa7vFQ0ryzcHVvhQQIJ41m2NitnhBbAhnYDK0=; b=pxQAYAt0SBrD1D8YlNxWwi35eKffYc9AI9JKvhME0gK73PFvgCLuCtcTxZaEogrsXf KbHpCKBWbCA/TuWK0nb2zI6Sk46LaBxyPFWWVOgdYpmVKuUvGHiq/FTs8nVF4lhs0Tpc DXDsI6oKz0nEkvHUAu8lfTBVNLnD/Yy4UdMb5MCkI/CxoE9FCHYR26JH0/rQjth7ymPp a+V1AGfWCjzif23gjHjn+ah0TnicnE3LT05C/JRcP0DSSjJSIkZPh9RNYu7a+HhtrWh5 EEluH5iud8cbCuqul2yXu080UqvYMCsYXI5GUfobai4/pmrFmulyHKoVG6aWIUHnYKEx JgAQ== 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=ACo0+eJa7vFQ0ryzcHVvhQQIJ41m2NitnhBbAhnYDK0=; b=BhEt6e8qhzmbd2J2uIQK9oxSnrbJ69BySfH1uxIyfmXPE7vWcnD13n97IiaLNmNE9H iIv6xmikiQeokzuZl4SGBgPRNN0NlMCzElDJL3F0nz0eCwTOJ+fOSxzOioOtqQq09eja kevxFyEbRzyqgde0sP4/5H4reUj7eFZxKonmVeRrIB04msdP8fkz49NcfjB9en7gFG7J dVUJGQhjClXIwX6B5SBrBlbIdQPAyJP/v6KX1lyMX1DRbP5v/M2ZV39J1lS4xaRnKir5 YttIktSQDxQ8Gq6OQpLYxY3H/lugsP0vBoztHEWnZVdC3V8mIgzLjWwKEGwhtdKI+u1q sfBA== X-Gm-Message-State: AKGB3mLECtfblcvnOp654Z//PhUCPNRggcJL8g6NQ7E44lLENzhOzxt7 dRJATf/W6y1NdDzGL4PxwhI= X-Google-Smtp-Source: ACJfBosHUGHehe1MtfMOMxe4pUeiMNMeYQVbUHdeYraSWYt6VtZ7g79yttCuyVeyh3sdyvrEPqodQg== X-Received: by 10.159.207.142 with SMTP id z14mr256764plo.235.1512996703698; Mon, 11 Dec 2017 04:51:43 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.51.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:51:42 -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 05/13] mn10300: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:17 +0900 Message-Id: <20171211125025.2270-6-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: David Howells --- arch/mn10300/kernel/traps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/mn10300/kernel/traps.c b/arch/mn10300/kernel/traps.c index 800fd0801969..72d1015b2ae7 100644 --- a/arch/mn10300/kernel/traps.c +++ b/arch/mn10300/kernel/traps.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -262,8 +261,7 @@ void show_trace(unsigned long *sp) raslot = ULONG_MAX; else printk(" ?"); - print_symbol(" %s", addr); - printk("\n"); + printk(" %pS\n", (void *)addr); } }