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

From: Linus Torvalds
Date: Fri Sep 01 2017 - 16:21:36 EST


On Fri, Sep 1, 2017 at 10:32 AM, Joe Perches <joe@xxxxxxxxxxx> wrote:
>
> Yes, it's a poor name. At least keep using a pr_ prefix.

I'd suggest perhaps just "pr_line()".

And instead of having those "err/info/cont" variations, the severity
level should just be set at initialization time. Not different
versions of "pr_line()".

There's no point to having different severity variations, since the
*only* reason for this would be for buffering. So "pr_cont()" is kind
of assumed for everything but the first.

And even if you end up doing multiple lines, if you actually do
different severities, you damn well shouldn't buffer them together.
They are clearly different things!

Linus