[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080414110316.GJ29599@tull.net>
Date: Mon, 14 Apr 2008 21:03:16 +1000
From: Nick Andrew <nick@...k-andrew.net>
To: Ingo Molnar <mingo@...e.hu>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>, joe@...ches.com
Subject: Re: [PATCH 2/2] printk: Remember the message level for multi-line output
On Mon, Apr 14, 2008 at 12:26:34PM +0200, Ingo Molnar wrote:
> * Nick Andrew <nick@...k-andrew.net> wrote:
> > Yes, quite. The state of whether we're inside a line is retained
> > across calls to printk (from anywhere in the system) - this allows
> > code like this to usually do what you expect:
> >
> > printk(KERN_ERR "Error:");
> > for (i = 0; i < 16; ++i) {
> > printk(" %02x", i);
> > }
> > printk("\n");
> >
> > But in your example the first printk call contains a \n at the end of
> > the line and so upon entry to the second printk call the function
> > knows a new line is beginning.
>
> ok - i think your change is a good one.
Thank you.
> btw., we could also start emitting debug warnings that the printk is not
> conform. Something like:
>
> "INFO: the previous printk was done without a KERN_ annotation"
There are 20k+ instances of this in the codebase; we don't need a
runtime message to find them. If you annotate them all, that will
add up to 60k to the binary size. Perhaps it's best to retain the
default support.
Nick.
--
PGP Key ID = 0x418487E7 http://www.nick-andrew.net/
PGP Key fingerprint = B3ED 6894 8E49 1770 C24A 67E3 6266 6EB9 4184 87E7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists