Re: [PATCH] IB/mlx5:: pr_err() and mlx5_ib_dbg() strings should end with newlines

From: Joe Perches
Date: Tue Sep 26 2017 - 11:05:47 EST


On Tue, 2017-09-26 at 11:38 +0300, Leon Romanovsky wrote:
> On Tue, Sep 26, 2017 at 12:20:01PM +0530, Arvind Yadav wrote:
> > pr_err() and mlx5_ib_dbg( messages should terminated with a new-line to
> > avoid other messages being concatenated.
[]
> Did you see it is happening?
> It is not needed after 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines")

Not completely true, and that commit message
itself is incorrect about how KERN_CONT was
ever required or not required.

After that commit, the dmesg output will
eventually be corrected with an appended newline
for sine line format strings without them, but
the printk subsystem has to wait for another
printk to occur before inserting that newline.

The commit message bit that says:

Things get much hairier when you have
multiple threads going on and user level
reading and writing logs too

is correct. That's the actual reason that
the proposed newline additions are reasonable.