Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1638159

RE: sky2: Use seq_putc() in sky2_debug_show()

From David Laight <David.Laight@ACULAB.COM>
Newsgroups linux.kernel
Subject RE: sky2: Use seq_putc() in sky2_debug_show()
Date 2017-05-09 16:30 +0200
Message-ID <tFejg-2TS-21@gated-at.bofh.it> (permalink)
References <tEU1c-6nV-11@gated-at.bofh.it> <tEUky-6JE-15@gated-at.bofh.it> <tEUXg-6Yd-9@gated-at.bofh.it> <tF6lI-5Sx-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] sky2: Use seq_putc() in sky2_debug_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 18:50 +0200
  Re: [PATCH] sky2: Use seq_putc() in sky2_debug_show() Lino Sanfilippo <LinoSanfilippo@gmx.de> - 2017-05-08 19:10 +0200
    Re: sky2: Use seq_putc() in sky2_debug_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 19:50 +0200
      Re: sky2: Use seq_putc() in sky2_debug_show() Stephen Hemminger <stephen@networkplumber.org> - 2017-05-09 08:00 +0200
        RE: sky2: Use seq_putc() in sky2_debug_show() David Laight <David.Laight@ACULAB.COM> - 2017-05-09 16:30 +0200

csiph-web