[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170901065925.GA12104@amd>
Date: Fri, 1 Sep 2017 08:59:25 +0200
From: Pavel Machek <pavel@....cz>
To: Joe Perches <joe@...ches.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>, Jan Kara <jack@...e.cz>,
Andrew Morton <akpm@...ux-foundation.org>,
Jiri Slaby <jslaby@...e.com>, Andreas Mohr <andi@...as.de>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: printk: what is going on with additional newlines?
On Thu 2017-08-31 19:04:24, Joe Perches wrote:
> On Fri, 2017-09-01 at 10:40 +0900, Sergey Senozhatsky wrote:
> > On (08/29/17 22:24), Pavel Machek wrote:
> > > > > In 4.13-rc, printk("foo"); printk("bar"); seems to produce
> > > > > foo\nbar. That's... quite surprising/unwelcome. What is going on
> > > > > there? Are timestamps responsible?
> []
> > > You are welcome not add checkpatch rules to prevent such code from being
> > > merged...
>
> Pavel, what does this mean?
That should have been "welcome to".
> > well... just a note, I personally developed a new habit - use
> > pr_err/pr_cont/etc macros instead of explicit printk(KERN_FOO "...").
> > may be this can work for you. and we _probably_ need to advertise
> > pr_foo() more.
>
> As well as convert the macros to functions
> to save some .text too.
IMO pr_foo() is bad interface for debugging. I don't care about
loglevels at that point, I just want to see the data... and difference
from userspace debugging actually hurts there.
Yes, I could train my fingers to just do pr_cont(), always, but
training fingers is hard.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists