Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932752AbcJGUE4 (ORCPT ); Fri, 7 Oct 2016 16:04:56 -0400 Received: from smtprelay0057.hostedemail.com ([216.40.44.57]:60429 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932193AbcJGUEv (ORCPT ); Fri, 7 Oct 2016 16:04:51 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3874:4321:4605:5007:6691:7903:10004:10400:10848:11232:11658:11914:12257:12296:12740:12760:13069:13095:13161:13229:13311:13357:13439:14181:14659:14721:21080:21433:30012:30034:30054:30055:30060:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: boy52_644be80209e2a X-Filterd-Recvd-Size: 2440 Message-ID: <1475870688.1945.13.camel@perches.com> Subject: Re: [GIT PULL] trivial for 4.9 From: Joe Perches To: Linus Torvalds , Jiri Kosina , Colin Ian King Cc: Linux Kernel Mailing List Date: Fri, 07 Oct 2016 13:04:48 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.0-2ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1498 Lines: 36 On Fri, 2016-10-07 at 12:22 -0700, Linus Torvalds wrote: > On Fri, Oct 7, 2016 at 1:51 AM, Jiri Kosina 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_ 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_ uses are mandated, then these newlines are still useful.