From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbdH2X71 (ORCPT ); Tue, 29 Aug 2017 19:59:27 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:35363 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbdH2X7Z (ORCPT ); Tue, 29 Aug 2017 19:59:25 -0400 MIME-Version: 1.0 In-Reply-To: <20170829195013.5048dc42@gandalf.local.home> 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> <20170829195013.5048dc42@gandalf.local.home> From: Linus Torvalds Date: Tue, 29 Aug 2017 16:59:24 -0700 X-Google-Sender-Auth: MTKj0qBrWPB8myu-Q5v3B7sD-1I Message-ID: Subject: Re: printk: what is going on with additional newlines? To: Steven Rostedt Cc: Sergey Senozhatsky , Pavel Machek , Sergey Senozhatsky , Petr Mladek , Jan Kara , Andrew Morton , Jiri Slaby , Andreas Mohr , Tetsuo Handa , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 29, 2017 at 4:50 PM, Steven Rostedt wrote: > > What about using the seq_buf*() then? They do have the nice property that because we use them for various /proc files, there are some helper functions in addition to just the puts/printt/vprintf. Ie seq_buf_putmem_hex(). And yeah, you can just do char buffer[80]; struct seq_buf s; seq_buf_init(&s, buffer, sizeof(buffer)); if you want to use a stack buffer for a single line. Linus