From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754149AbdEIO1F (ORCPT ); Tue, 9 May 2017 10:27:05 -0400 Received: from smtp-out6.electric.net ([192.162.217.193]:53586 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752417AbdEIO1D (ORCPT ); Tue, 9 May 2017 10:27:03 -0400 From: David Laight To: "'Stephen Hemminger'" , SF Markus Elfring CC: Lino Sanfilippo , "netdev@vger.kernel.org" , Mirko Lindner , LKML , "kernel-janitors@vger.kernel.org" Subject: RE: sky2: Use seq_putc() in sky2_debug_show() Thread-Topic: sky2: Use seq_putc() in sky2_debug_show() Thread-Index: AQHSyIgnl/ujUOXEcEWb6mbwaJHD0KHsDoPw Date: Tue, 9 May 2017 14:26:58 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFE7F45@AcuExch.aculab.com> References: <1f36d45e-3ca9-bfb8-0634-901c42390e2c@users.sourceforge.net> <8594c152-68a4-c0c7-b4c6-49c753b0c748@gmx.de> <20170508225012.508f24c0@xeon-e3> In-Reply-To: <20170508225012.508f24c0@xeon-e3> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v49ESFB2018076 From: Stephen Hemminger > Sent: 09 May 2017 06:50 > On Mon, 8 May 2017 19:42:46 +0200 > SF Markus Elfring wrote: > > > > Which issue do you mean? I dont see any issue you fix here. > > > > Are the run time characteristics a bit nicer for the function seq_putc > > in comparison to the function seq_puts for printing a single line break here? > > > > Regards, > > Markus > > I would put this in why bother category. seq_puts is correct and this is only > in diagnostic output useful to developer and disabled on most distro kernels Sometimes consistency is best. Output everything with seq_printf(), using a format "%s" if necessary. The performance really doesn't matter here at all. It is also (probably) possible to get gcc to do the conversions - as it does for printf(). (A right PITA for embedded systems where only printf() exists.) David