RE: sky2: Use seq_putc() in sky2_debug_show()
From: David Laight
Date: Tue May 09 2017 - 10:27:08 EST
From: Stephen Hemminger
> Sent: 09 May 2017 06:50
> On Mon, 8 May 2017 19:42:46 +0200
> SF Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> 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