Re: printk: what is going on with additional newlines?

From: Steven Rostedt
Date: Fri Sep 01 2017 - 07:13:49 EST


On Fri, 1 Sep 2017 09:29:06 +0200
Pavel Machek <pavel@xxxxxx> wrote:


> Well, usually dev_info (and friends) is right thing to use for
> production. But very little debugging remains after the
> .. well.. debugging phase, so something that behaves similar to
> printf() is nice.

Try using trace_printk(). Who uses printk() to debug anymore ;-)

>
> Actually, I believe we should just create printf() in kernel. Its the
> mistake I do all the time.

It's a way to tell you how much user vs kernel programming you do. When
you type printk() in user space, you know you've been doing more kernel
programming. When you type printf() in kernel space, you've been doing
more user space programming.

-- Steve