From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942AbdH3BEy (ORCPT ); Tue, 29 Aug 2017 21:04:54 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35266 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751440AbdH3BEw (ORCPT ); Tue, 29 Aug 2017 21:04:52 -0400 Date: Wed, 30 Aug 2017 10:07:16 +0900 From: Sergey Senozhatsky To: Joe Perches Cc: Linus Torvalds , Sergey Senozhatsky , Tejun Heo , Sergey Senozhatsky , Pavel Machek , 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: <20170830010716.GC654@jagdpanzerIV.localdomain> References: <20170815025625.1977-1-sergey.senozhatsky@gmail.com> <20170828090521.GA25025@amd> <20170828102830.GA403@jagdpanzerIV.localdomain> <20170828122109.GA532@jagdpanzerIV.localdomain> <20170828124634.GD492@amd> <20170829134048.GA437@jagdpanzerIV.localdomain> <20170829173314.GA623@tigerII.localdomain> <1504030160.2040.35.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1504030160.2040.35.camel@perches.com> 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 On (08/29/17 11:09), Joe Perches wrote: [..] > > Introduce a few helper functions for it: > > > > init_line_buffer(&buf); > > print_line(&buf, fmt, args); > > vprint_line(&buf, fmt, vararg); > > finish_line(&buf); > > > > or whatever, and it sounds like it should be pretty easy to use. > > Mostly true and not a new solution. > > You'll now need to add &buf to called functions that > continue individual line output. > > Tejun Heo suggested the very similar mprintk back in 2008. > > http://thread.gmane.org/gmane.linux.ide/27199 interesting. thanks for the link. -ss