Messages in this thread | | | From | David Laight <> | Subject | RE: sky2: Use seq_putc() in sky2_debug_show() | Date | Tue, 9 May 2017 14:26:58 +0000 |
| |
From: Stephen Hemminger > Sent: 09 May 2017 06:50 > On Mon, 8 May 2017 19:42:46 +0200 > SF Markus Elfring <elfring@users.sourceforge.net> 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
| |