Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp600754ybz; Wed, 15 Apr 2020 14:55:29 -0700 (PDT) X-Google-Smtp-Source: APiQypIqHKFaIACMEH7zMR1ycJJoMZgWuDp85YWe3WQ3du7F9NNvcaJj2ex9RGDV8tuUPUMOhIH8 X-Received: by 2002:a17:906:2584:: with SMTP id m4mr6982253ejb.200.1586987729003; Wed, 15 Apr 2020 14:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586987728; cv=none; d=google.com; s=arc-20160816; b=TR7TWuXhhiBtUN2kT7n5q2fWiqmm6OX/KAt3XMqtiaQxQ/OG3p01g4+kBaV2/xguDL RvAn2p1roHUY8waYzpPD3HkHzg18qhP1md7lUYbL+XrSE4dZbW3f3XKbsLZJSDJtWpT4 Blquu0FZyc/MeRnCae/UETKnwcrneoTBMPhWwDSbtNoImYkmzTsod8cR5aj6MSovyCV+ 3DFsgIkO97wyrxs+UnakYXegyPoPa5xIDeYxkqEaX2RrGl99JaTcP3WISSlB5WMaFsf/ RCowmloggFAg04U74jRKwbcyihuREo4x8g0wmNSTKpam0vht1QXU41gT6ZA/mMBZDqE+ ii7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=gZOmwE2rdw79NJW8QCwLP9UKbIT+SBr8HsbUvJ7HGWo=; b=mcqm1IQBUkuxKtho6pfaWxiHuxdL/00viMob53pvUGsrgn2CipyBuPuGO10QEsPtRD 4IkaeasviPb3T+wa2lWhLR5srwiil7wajjcchLjs2V5d2GaDiFoRwkqaA9M5VG5KCyID lwHETnQvNMQYcHJ+xWf9sUKEHAjcBKGJVQLMZSgsmvLenMZ+zvFuIaOGJ6we3bcPpFfo rQTMKAsXiHer67xQ7AY8OtDMHsGaPhpfYmfho6oGhpsIDIOb0QB4RKHIfO5qw5ap9N8k 3PAxuUozkJ68ELsvMDIqmtR0XP/GrPeA9asyuZZ0m1xC3O+IXank5MdCEASqK8hBEk3P vtyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si3047165edr.360.2020.04.15.14.55.05; Wed, 15 Apr 2020 14:55:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505144AbgDNToK (ORCPT + 99 others); Tue, 14 Apr 2020 15:44:10 -0400 Received: from smtprelay0090.hostedemail.com ([216.40.44.90]:45892 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728340AbgDNTn7 (ORCPT ); Tue, 14 Apr 2020 15:43:59 -0400 Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave08.hostedemail.com (Postfix) with ESMTP id 2B6EF1802B57F; Tue, 14 Apr 2020 19:06:44 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 00FE6181D341E; Tue, 14 Apr 2020 19:06:44 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4423:5007:6248:7903:10004:10400:10848:11232:11658:11914:12043:12048:12262:12296:12297:12438:12555:12679:12740:12760:12895:13018:13019:13069:13095:13141:13161:13181:13229:13230:13311:13357:13439:14096:14097:14181:14659:14721:14777:21080:21212:21365:21433:21451:21627:21660:30054:30070:30079:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:7,LUA_SUMMARY:none X-HE-Tag: sky28_1d7a3c1bf3225 X-Filterd-Recvd-Size: 2209 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA; Tue, 14 Apr 2020 19:06:42 +0000 (UTC) Message-ID: Subject: Re: [PATCH] pwm: Add missing '\n' in log messages From: Joe Perches To: Christophe JAILLET , Thierry Reding , paul@crapouillou.net, Dan Carpenter Cc: u.kleine-koenig@pengutronix.de, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Date: Tue, 14 Apr 2020 12:04:32 -0700 In-Reply-To: References: <20200411153528.30130-1-christophe.jaillet@wanadoo.fr> <20200414135827.GB3593749@ulmo> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-04-14 at 20:30 +0200, Christophe JAILLET wrote: > Being able to detect early missing trailing '\n' would help maintainers > and patch providers. > > You are the 2nd person (I've added Paul Cercueil in copy of my reply) > who reports that he is thinking that it is no more required to add a '\n'. The printk subsystem will, for every printk, check if the last printk has a newline termination and if it doesn't and the current printk does not start with KERN_CONT will insert a newline. The negative to this approach is the last printk, if it does not have a newline, is buffered and not emitted until another printk occurs. There is also the (now small) possibility that multiple concurrent kernel threads or processes could interleave printks without a terminating newline and a different process could emit a printk that starts with KERN_CONT and the emitted message could be garbled. See: commit 4bcc595ccd80decb4245096e3d1258989c50ed41 Author: Linus Torvalds Date: Sat Oct 8 20:32:40 2016 -0700 printk: reinstate KERN_CONT for printing continuation lines