From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752915AbbJFQAZ (ORCPT ); Tue, 6 Oct 2015 12:00:25 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:35009 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbbJFQAW (ORCPT ); Tue, 6 Oct 2015 12:00:22 -0400 From: Rasmus Villemoes To: Jiri Slaby Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org Subject: Re: [PATCH 1/2] x86: dumpstack, use pr_cont Organization: D03 References: <1444134578-3790-1-git-send-email-jslaby@suse.cz> X-Hashcash: 1:20:151006:x86@kernel.org::PwlWfn/IAZNdZp7j:00015HF X-Hashcash: 1:20:151006:mingo@redhat.com::gix7Wsa6YfgW1gYX:02KlI X-Hashcash: 1:20:151006:tglx@linutronix.de::MKvldEwY3YWRb6Hz:00000000000000000000000000000000000000000004J/7 X-Hashcash: 1:20:151006:jslaby@suse.cz::vkaBusU+qk+gqNhY:0006sf0 X-Hashcash: 1:20:151006:hpa@zytor.com::1GNzMQAX41raET7G:00005PwM X-Hashcash: 1:20:151006:linux-kernel@vger.kernel.org::jTQ8Hxtgknae637+:0000000000000000000000000000000008eVI Date: Tue, 06 Oct 2015 18:00:19 +0200 In-Reply-To: <1444134578-3790-1-git-send-email-jslaby@suse.cz> (Jiri Slaby's message of "Tue, 6 Oct 2015 14:29:37 +0200") Message-ID: <874mi4m1gs.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 06 2015, Jiri Slaby wrote: > When dumping flags with which the kernel was built, we print them one > by one in separate printks. Let's use pr_cont as they are > continuation prints. > > Signed-off-by: Jiri Slaby > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: x86@kernel.org > --- > arch/x86/kernel/dumpstack.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c > index 9c30acfadae2..3850c992f767 100644 > --- a/arch/x86/kernel/dumpstack.c > +++ b/arch/x86/kernel/dumpstack.c > @@ -260,18 +260,18 @@ int __die(const char *str, struct pt_regs *regs, long err) > printk(KERN_DEFAULT > "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter); > #ifdef CONFIG_PREEMPT > - printk("PREEMPT "); > + pr_cont("PREEMPT "); > #endif > #ifdef CONFIG_SMP > - printk("SMP "); > + pr_cont("SMP "); > #endif > #ifdef CONFIG_DEBUG_PAGEALLOC > - printk("DEBUG_PAGEALLOC "); > + pr_cont("DEBUG_PAGEALLOC"); cosmetic: this lost a space. May I suggest diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 9c30acfadae2..b473a47d1851 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -257,21 +257,23 @@ int __die(const char *str, struct pt_regs *regs, long err) unsigned short ss; unsigned long sp; #endif - printk(KERN_DEFAULT - "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter); + static const char build_flags[] = "" #ifdef CONFIG_PREEMPT - printk("PREEMPT "); + " PREEMPT" #endif #ifdef CONFIG_SMP - printk("SMP "); + " SMP" #endif #ifdef CONFIG_DEBUG_PAGEALLOC - printk("DEBUG_PAGEALLOC "); + " DEBUG_PAGEALLOC" #endif #ifdef CONFIG_KASAN - printk("KASAN"); + " KASAN" #endif - printk("\n"); + ; + printk(KERN_DEFAULT + "%s: %04lx [#%d]%s\n", str, err & 0xffff, ++die_counter, + build_flags); if (notify_die(DIE_OOPS, str, regs, err, current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP) return 1; instead, so that there's only one printk call and the pr_cont issue goes away? Rasmus