From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751410AbdIABk7 (ORCPT ); Thu, 31 Aug 2017 21:40:59 -0400 Received: from mail-pg0-f52.google.com ([74.125.83.52]:38127 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109AbdIABk5 (ORCPT ); Thu, 31 Aug 2017 21:40:57 -0400 X-Google-Smtp-Source: ADKCNb7FCET0sGpOcRS8KmwfBn5jH1qMugej9aCwx5xbhUz7HvuYpTlHO0xS7bcHxXGWtcVWfVL7Fg== Date: Fri, 1 Sep 2017 10:40:12 +0900 From: Sergey Senozhatsky To: Pavel Machek Cc: Linus Torvalds , 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: <20170901014012.GA814@jagdpanzerIV.localdomain> References: <20170815025625.1977-1-sergey.senozhatsky@gmail.com> <20170828090521.GA25025@amd> <20170829202447.GA20829@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170829202447.GA20829@amd> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 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? > > > > No. > > > > It's actively trying to treach you not to do shit. > > > > If you want to continue a line, you NEED to use KERN_CONT. > > > > 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... 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. -ss