From patchwork Mon Dec 11 12:50:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Senozhatsky X-Patchwork-Id: 10104931 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 06A07602B3 for ; Mon, 11 Dec 2017 12:51:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D044729583 for ; Mon, 11 Dec 2017 12:51:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C474E29585; Mon, 11 Dec 2017 12:51:35 +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 7E35529583 for ; Mon, 11 Dec 2017 12:51:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752994AbdLKMvX (ORCPT ); Mon, 11 Dec 2017 07:51:23 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33889 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752974AbdLKMvT (ORCPT ); Mon, 11 Dec 2017 07:51:19 -0500 Received: by mail-pf0-f194.google.com with SMTP id a90so11473627pfk.1; Mon, 11 Dec 2017 04:51:18 -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=ZFB9ps8rFhRmhvjJE5NpTgAxFviXfoaXY9VkPt2Wdb0=; b=dt8tiB1i344FL8PZLwq8K6IrVnU8i+/8FsortFL3YqqidAQTrMJI9CtLCpOJbrgGIz rq6VzdsisNrYPObfdkPNQRvpM2j8+s3vA2f2A4mz/BA6nXsLDfh750+t3Ks/XwM6Xx+c Z9HTr1gUWuztQfuDxJ4YUSFfCFxBd4mqwoMLxa79F9wvb+WYpJr9uZ2r2FLpIOdOWRzR g9wyRjC9iBMd9nmUML4mJN2WCKV9CHno9QgtilGT7rg9QMEzO0BNO2hHV3hvPuA90JV+ sRAEDQZPHYksNhXjT6AnViZZ4HgcSzYNLBS6ngoOUhDEQqG+RlKpTyGzCbpaCLULnKW5 djPg== 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=ZFB9ps8rFhRmhvjJE5NpTgAxFviXfoaXY9VkPt2Wdb0=; b=JBmNInwjRghGDjm9Hxp00ZgXczSQ6H7iAeo46ok4YjNMRZ/hS50qyHjtV/tubi8yGd QclcN5ovuUFoI/wQJ5/MbqZfR/FHlrHHDigzRjEkNx7Vs4C6Bkg22GZ13BMVqoJspVvI GpoTG9WGUAYmzMFxtluBiu4xjuziBWAwNUrEBekHUYYwIUYatvKUgdvurHND98nZgqYE PlHWXE3+MvTq3WxTWZlJ4BYAh6eb5Dw3qK5U3IZgVpLUQC/IX4K00wpm+g/4F4p1O4lP VQVzkw/x41kWMeXWaCaXfUZ1VRWxHb1Q/ggt5vTT8e/CeaUffm1Xo6rXtOOdy/aJ+bFC AGdw== X-Gm-Message-State: AKGB3mIWfxkdoFWo4VDtRQ8hPXOY6/4L17NWQC+RMOMkeZb1UL3zk2fb ueQnDHUIlXYihOwDsOPP0ww= X-Google-Smtp-Source: ACJfBotKC3aDuL07kqSfpA8aWxm1OBzMnEqnPFCH5TGykgEt4E3TjBSuLxcjuT2gEEQWAUH3u4NA1Q== X-Received: by 10.101.93.8 with SMTP id e8mr266279pgr.214.1512996678504; Mon, 11 Dec 2017 04:51:18 -0800 (PST) Received: from localhost.localdomain ([110.70.53.61]) by smtp.gmail.com with ESMTPSA id j13sm23374380pff.131.2017.12.11.04.51.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 04:51:17 -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 , Aurelien Jacquiot Subject: [PATCH 03/13] c6x: do not use print_symbol() Date: Mon, 11 Dec 2017 21:50:15 +0900 Message-Id: <20171211125025.2270-4-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: Mark Salter Cc: Aurelien Jacquiot --- arch/c6x/kernel/traps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/c6x/kernel/traps.c b/arch/c6x/kernel/traps.c index 09b8a40d5680..4c1d4b84dd2b 100644 --- a/arch/c6x/kernel/traps.c +++ b/arch/c6x/kernel/traps.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -375,8 +374,7 @@ static void show_trace(unsigned long *stack, unsigned long *endstack) if (i % 5 == 0) pr_debug("\n "); #endif - pr_debug(" [<%08lx>]", addr); - print_symbol(" %s\n", addr); + pr_debug(" [<%08lx>] %pS\n", addr, (void *)addr); i++; } }