All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Jiri Kosina <jikos@kernel.org>,
	Colin Ian King <colin.king@canonical.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] trivial for 4.9
Date: Fri, 07 Oct 2016 13:04:48 -0700	[thread overview]
Message-ID: <1475870688.1945.13.camel@perches.com> (raw)
In-Reply-To: <CA+55aFwCWpyteg6xuuYY_84Vzu8KTVw-Az2_NNPGsSqqm-RA3g@mail.gmail.com>

On Fri, 2016-10-07 at 12:22 -0700, Linus Torvalds wrote:
> On Fri, Oct 7, 2016 at 1:51 AM, Jiri Kosina <jikos@kernel.org> wrote:
> > Colin Ian King (5):
> >       netfilter: Add missing \n to pr_err() message
> >       agp/intel: add missing \n to end of dev_emerg message
> >       lightnvm: add missing \n to end of dev_err message
> >       nvme: add missing \n to end of dev_warn message
> 
> 
> We really shouldn't be needing these final '\n' characters any more, afaik.
> 
> If the next printk isn't done by the same process, and doesn't have a
> KERN_CONT, the printk machinery should add the newline on its own.
> 
> I realize that people have been adding these '\n' characters for a
> while, but is there actually any point to it? They make the code less
> legible, imho. And we actually have a number of logging functions that
> explicitly don't want the newline (eg ext4_warning/error()), so it's
> actually more consistent to *not* have a newline than it is to have
> one.

Not remotely true.

It's _way_ more consistent to use a newline termination.
Macros without the newline are _far_ less common than those
with newlines.

Any printk without a KERN_<level> prefix, and there
are still many of those, can cause random interleaving.

> And if those '\n' characters actually make a difference, that should
> be noted. Because that would imply that the printk logic isn't working
> right.

Not at all.  Until printk KERN_<level> uses are mandated,
then these newlines are still useful.

  reply	other threads:[~2016-10-07 20:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07  8:51 [GIT PULL] trivial for 4.9 Jiri Kosina
2016-10-07 19:22 ` Linus Torvalds
2016-10-07 20:04   ` Joe Perches [this message]
2016-10-07 20:13     ` Linus Torvalds
2016-10-07 20:18       ` Joe Perches
2016-10-07 20:25         ` Linus Torvalds
2016-10-07 20:33           ` Joe Perches
2016-10-07 21:06             ` Linus Torvalds
2016-10-07 21:37               ` Linus Torvalds
2016-10-08  7:36                 ` Joe Perches
2016-10-10  5:48                 ` Joe Perches
2016-10-07 21:44               ` Joe Perches
2016-10-07 23:01                 ` Tony Luck
2016-10-07 23:09                   ` Tony Luck
2016-10-07 23:36                     ` Linus Torvalds
2016-10-08 13:16                     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475870688.1945.13.camel@perches.com \
    --to=joe@perches.com \
    --cc=colin.king@canonical.com \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.