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: 846957 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lMXJVWDU"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="kGphvljM"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DBHWNDoZ"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ywNFC6wCBz9s1h for ; Mon, 11 Dec 2017 23:54:07 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4rxTq8Sqps/WRgGj7Hsz0chN0mq479bJi0miq0LdUVc=; b=lMXJVWDUyNwpLhdvo/TNb1u0H0 eALQb57TMVoxy2DUC16n6kkaw3Qi5gLolJXEx/8et9dOLnbsD4Si470W9yZ6IR9p8+Mo1HOlYvjnn RaZGmUaPUgF9QQOnNo13zT2JZPVqaAbtCUKt3UMvlubMgjIwWiLPgNvPFxpYE5GcPCc3ygVFdf676 g+k3WvygdlQQ3ik0QZ0sFWD1qnBzFEEgLlo582ySMbGuOqWPTO4XGoxg77eB55Brl+PtK3q36M8TR wxcqqFwM2dRwZWeiglWlPlZ6Q4RaaBAS1NZevwuisc7/dxpqb48L7QJcSD/Ef4rGX0kmT8IDT8lSH lFlDxKfg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eONav-0001KP-M2; Mon, 11 Dec 2017 12:54:05 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONZH-0008Rw-9N; Mon, 11 Dec 2017 12:52:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KrWSHlOYopSeKywswoL6bmz5Brm50fKGfd3eB+CdwVY=; b=kGphvljMbrLHQtLzVZEqn1TAv 2qdTDycQVyCiRRoAKDX+i2BEkuMH7l6RAQ7WmghF09yu3PEH4+BuFbCjYm2DDeV2y1nZYnw4oqK5C 7ovJhqJ2NLW7b2l8J1dkuMLjkjVbSapUudRdw8LOvh8d59dn4+hvx7YMNpt5qtshYMHd+/WzmA2Vn 6fySbCNvwX1ElIw5hVlRJrQauRIHuiymM96BBCjuTfT6Ph3fdhyCfSjIvjlNzPwmM7G3cF7aHCfkh S+mEB4WtZX/++eXmkZv8iC6evCAOWwpZ05n17SKybLjU8YxNDQ4Ex+Sf9vuyTyzFiLb9xwIH1vfAJ YdFbWGMoQ==; Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eONZC-0007xg-Lr; Mon, 11 Dec 2017 12:52:21 +0000 Received: by mail-pg0-x241.google.com with SMTP id m25so10842945pgv.12; Mon, 11 Dec 2017 04:51:57 -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=N9XkbEALMd8l/R+Vn31b5hOc/dgKir/nnLasoJpHijMh5XkHzfqPrf9ezPh6g1Vzwg MfDOX1jD9qenT+gNTJFN9jlfdSyeGthvnKXs1dfra+f1oReizFS/MLf+vIDlGbPGeVF0 qJv0iiQQqlonAmKUxYpS8Xl2Z5KnjCVsZdtjEXay9vWSk/rmuCXq60oX1h29VxZcqfPw uRqoCzT4LJmapiIAHHdMjij9J+yMrHxZj9VwJUsTF+Fx1ZCLg4KDcs+CTV3h7kRg2jwG q71jgsppR62oq4e9P+B0VuAF+JfNUjA5HmBS8v1uYGrMeZ+dwYuo4LdR3ZSU1Dq7lh+2 n/oQ== X-Gm-Message-State: AKGB3mKmiHHq3Lr7ohg6gTWyrSW2Vo8ZorIOkHWIMMV3uNOn0zfbxbtw 6TABk4nH3SWPdrMD+XPHF9w= 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 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> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (sergey.senozhatsky.work[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , linux-am33-list@redhat.com, linux-ia64@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-sh@vger.kernel.org, x86@kernel.org, Sergey Senozhatsky , LKML , Steven Rostedt , Sergey Senozhatsky , Rich Felker , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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);