From patchwork Sun Oct 23 20:40:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 9391225 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 32EBE60762 for ; Sun, 23 Oct 2016 20:43:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E61C28865 for ; Sun, 23 Oct 2016 20:43:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E40D228AB0; Sun, 23 Oct 2016 20:43:29 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 34ABA28865 for ; Sun, 23 Oct 2016 20:43:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1byPa4-0000ZL-I0; Sun, 23 Oct 2016 20:41:20 +0000 Received: from smtprelay0057.hostedemail.com ([216.40.44.57] helo=smtprelay.hostedemail.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1byPZz-0000XV-At for linux-arm-kernel@lists.infradead.org; Sun, 23 Oct 2016 20:41:16 +0000 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id B01999EA16; Sun, 23 Oct 2016 20:40:51 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: desk94_247c1c382873a X-Filterd-Recvd-Size: 1956 Received: from joe-laptop.perches.com (unknown [47.151.132.55]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Sun, 23 Oct 2016 20:40:50 +0000 (UTC) From: Joe Perches To: Mark Rutland , linux-kernel@vger.kernel.org Subject: [PATCH] arm64: Neaten show_regs, remove KERN_CONT Date: Sun, 23 Oct 2016 13:40:49 -0700 Message-Id: <4cbf196b83cd9d175634e7056744dc649ae87f63.1477253239.git.joe@perches.com> X-Mailer: git-send-email 2.10.0.rc2.1.g053435c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161023_134115_462292_90B60AD6 X-CRM114-Status: UNSURE ( 8.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP commit db4b0710fae9 ("arm64: fix show_regs fallout from KERN_CONT changes") corrected the KERN_CONT fallout from commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines"), but the code still has unnecessary KERN_CONT uses. Remove them. Miscellanea: o Remove unnecessary trailing blank from the output too. Signed-off-by: Joe Perches Acked-by: Mark Rutland --- arch/arm64/kernel/process.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 01753cd7d3f0..2278e7197a8e 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -190,18 +190,16 @@ void __show_regs(struct pt_regs *regs) i = top_reg; - while (i >= 0) { - printk("x%-2d: %016llx ", i, regs->regs[i]); + if (i >= 0 && !(i % 2)) { + printk("x%-2d: %016llx\n", i, regs->regs[i]); i--; - - if (i % 2 == 0) { - pr_cont("x%-2d: %016llx ", i, regs->regs[i]); - i--; - } - - pr_cont("\n"); } - printk("\n"); + while (i > 0) { + printk("x%-2d: %016llx x%-2d: %016llx\n", + i, regs->regs[i], + i - 1, regs->regs[i - 1]); + i -= 2; + } } void show_regs(struct pt_regs * regs)