mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] WARN(): add a \n to the message printk
Date: Mon, 15 Jun 2009 09:38:24 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0906150933330.3305@localhost.localdomain> (raw)
In-Reply-To: <20090615000822.6e6bf282@infradead.org>



On Mon, 15 Jun 2009, Arjan van de Ven wrote:
>  
> -	if (args)
> +	if (args) {
>  		vprintk(args->fmt, args->args);
> +		printk("\n");
> +	}

I really don't like this. What if the format already does have a '\n'? And 
what if some other CPU is printing at the same time?

I'd almost be open to adding a "flags" field to vprintk, and allow setting 
things like "finish line with \n" there. Or perhaps even better, have a 
"vprintk_line()" function that does it with no dynamic flags. Maybe make 
it static, and move all these panic helper funtions into kernel/printk.c 
(since this really is a special case).	

I dunno. I'm just throwing out suggestions. I just don't think the above 
patch is very nice.

		Linus

  parent reply	other threads:[~2009-06-15 16:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-15  7:08 Arjan van de Ven
2009-06-15  9:09 ` Alan Cox
2009-06-15 14:13   ` Arjan van de Ven
2009-06-15 16:38 ` Linus Torvalds [this message]
2009-06-15 16:58   ` Linus Torvalds
2009-06-15 17:10     ` Ingo Molnar
2009-06-16  4:04       ` Linus Torvalds
2009-06-16  4:16         ` Linus Torvalds
2009-06-16  5:46         ` Arjan van de Ven
2009-06-15 17:57     ` Linus Torvalds
2009-06-15 18:39       ` Ingo Molnar
2009-06-15 18:53       ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.01.0906150933330.3305@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®