From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751411AbdH2UYv (ORCPT ); Tue, 29 Aug 2017 16:24:51 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33011 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249AbdH2UYu (ORCPT ); Tue, 29 Aug 2017 16:24:50 -0400 Date: Tue, 29 Aug 2017 22:24:48 +0200 From: Pavel Machek To: Linus Torvalds Cc: Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Jan Kara , Andrew Morton , Jiri Slaby , Andreas Mohr , Tetsuo Handa , Linux Kernel Mailing List , Sergey Senozhatsky Subject: Re: printk: what is going on with additional newlines? Message-ID: <20170829202447.GA20829@amd> References: <20170815025625.1977-1-sergey.senozhatsky@gmail.com> <20170828090521.GA25025@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > In 4.13-rc, printk("foo"); printk("bar"); seems to produce > > foo\nbar. That's... quite surprising/unwelcome. What is going on > > there? Are timestamps responsible? >=20 > No. >=20 > It's actively trying to treach you not to do shit. >=20 > If you want to continue a line, you NEED to use KERN_CONT. >=20 > That has always been true. It hasn't always been enforced, though. Dumping hex buffer for debugging should not be a rocket science. You are welcome not add checkpatch rules to prevent such code from being merged... > Stop doing continuations at all please. But if you do, you'd better > use KERN_CONT. And if you don't, and you get multiple lines, it's your > own damn fault. =2E.but please don't make debugging harder than it already is. Just because you spend too much time doing kernel does not mean that everyone is; having to remember "this is kernel, so it has to be special, you have to do printk, not printf" is bad enough, having different semantics is even more ugly. Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlmlzY8ACgkQMOfwapXb+vJefgCeMBEL93isa4nY2Vb53qPVWeIR ZmYAoKAnjSdEuN36UK2zNZbMdlY8FBkn =Hisa -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--