From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbdIAG73 (ORCPT ); Fri, 1 Sep 2017 02:59:29 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45100 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbdIAG72 (ORCPT ); Fri, 1 Sep 2017 02:59:28 -0400 Date: Fri, 1 Sep 2017 08:59:25 +0200 From: Pavel Machek To: Joe Perches Cc: Sergey Senozhatsky , Linus Torvalds , Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Jan Kara , Andrew Morton , Jiri Slaby , Andreas Mohr , Tetsuo Handa , Linux Kernel Mailing List Subject: Re: printk: what is going on with additional newlines? Message-ID: <20170901065925.GA12104@amd> References: <20170815025625.1977-1-sergey.senozhatsky@gmail.com> <20170828090521.GA25025@amd> <20170829202447.GA20829@amd> <20170901014012.GA814@jagdpanzerIV.localdomain> <1504231464.2786.52.camel@perches.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <1504231464.2786.52.camel@perches.com> 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 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2017-08-31 19:04:24, Joe Perches wrote: > On Fri, 2017-09-01 at 10:40 +0900, Sergey Senozhatsky wrote: > > On (08/29/17 22:24), Pavel Machek wrote: > > > > > 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? > [] > > > You are welcome not add checkpatch rules to prevent such code from be= ing > > > merged... >=20 > Pavel, what does this mean? That should have been "welcome to". > > well... just a note, I personally developed a new habit - use > > pr_err/pr_cont/etc macros instead of explicit printk(KERN_FOO "..."). > > may be this can work for you. and we _probably_ need to advertise > > pr_foo() more. >=20 > As well as convert the macros to functions > to save some .text too. IMO pr_foo() is bad interface for debugging. I don't care about loglevels at that point, I just want to see the data... and difference =66rom userspace debugging actually hurts there. Yes, I could train my fingers to just do pr_cont(), always, but training fingers is hard. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlmpBU0ACgkQMOfwapXb+vLJvgCfXXR5tfm0uswDW2jEDwcTlbmM 65UAoIMtAEuqGHgB9XhUYiZMyhvRGRC6 =rzJg -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ--