Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-18 Thread Joe Perches
On Mon, 2013-03-18 at 13:59 -0700, Andrew Morton wrote: > On Sat, 16 Mar 2013 17:54:47 + Al Viro wrote: > > > On Sat, Mar 16, 2013 at 06:50:44AM -0700, Joe Perches wrote: > > > Instead of converting the 800 or so uses of seq_printf with > > > a constant format (without a % substitution) to se

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-18 Thread Andrew Morton
On Sat, 16 Mar 2013 17:54:47 + Al Viro wrote: > On Sat, Mar 16, 2013 at 06:50:44AM -0700, Joe Perches wrote: > > Instead of converting the 800 or so uses of seq_printf with > > a constant format (without a % substitution) to seq_puts, > > maybe there's another way to slightly speed up these o

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Steven Rostedt
On Sat, 2013-03-16 at 18:01 +, Al Viro wrote: > On Sat, Mar 16, 2013 at 10:51:18AM -0700, Joe Perches wrote: > > > This is certainly a neat trick. > > > > > > But I don't really like the fact that it complicates things for every > > > future code reader, especially when a trivial change in the

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Al Viro
On Sat, Mar 16, 2013 at 10:51:18AM -0700, Joe Perches wrote: > > This is certainly a neat trick. > > > > But I don't really like the fact that it complicates things for every > > future code reader, especially when a trivial change in the caller > > would accomplish the same thing. Do you have an

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Al Viro
On Sat, Mar 16, 2013 at 06:50:44AM -0700, Joe Perches wrote: > Instead of converting the 800 or so uses of seq_printf with > a constant format (without a % substitution) to seq_puts, > maybe there's another way to slightly speed up these outputs. > > Taking a similar approach to commit abd84d60eb

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Joe Perches
On Sat, 2013-03-16 at 09:43 -0600, Bjorn Helgaas wrote: > On Sat, Mar 16, 2013 at 7:50 AM, Joe Perches wrote: > > Instead of converting the 800 or so uses of seq_printf with > > a constant format (without a % substitution) to seq_puts, > > maybe there's another way to slightly speed up these outpu

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Joe Perches
On Sat, 2013-03-16 at 09:43 -0600, Bjorn Helgaas wrote: > Checkpatch could look for additions of seq_printf() with constant formats. Suggested-by: Bjorn Helgaas Signed-off-by: Joe Perches --- I don't know what perl version introduced $-[0] and $+[0] so this may not work with older perl. scrip

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Steven Rostedt
On Sat, 2013-03-16 at 09:15 -0700, Joe Perches wrote: > > > +int (seq_printf)(struct seq_file *m, const char *f, ...) > > > > That's rather ugly. Why not just #undef seq_printf before defining it? > > The whole thing is ugly, nasty and hackish. > I kinda like it. > > But I don't like unnecessar

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Joe Perches
On Sat, 2013-03-16 at 11:57 -0400, Steven Rostedt wrote: > My macro nastiness is contagious ;-) True. > On Sat, 2013-03-16 at 06:50 -0700, Joe Perches wrote: > > +int (seq_printf)(struct seq_file *m, const char *f, ...) > > That's rather ugly. Why not just #undef seq_printf before defining it?

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Steven Rostedt
On Sat, 2013-03-16 at 09:43 -0600, Bjorn Helgaas wrote: > This is certainly a neat trick. Thank you ;-) > > But I don't really like the fact that it complicates things for every > future code reader, especially when a trivial change in the caller > would accomplish the same thing. Do you have

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Steven Rostedt
My macro nastiness is contagious ;-) On Sat, 2013-03-16 at 06:50 -0700, Joe Perches wrote: > Instead of converting the 800 or so uses of seq_printf with > a constant format (without a % substitution) to seq_puts, > maybe there's another way to slightly speed up these outputs. > > Taking a simila

Re: [RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Bjorn Helgaas
On Sat, Mar 16, 2013 at 7:50 AM, Joe Perches wrote: > Instead of converting the 800 or so uses of seq_printf with > a constant format (without a % substitution) to seq_puts, > maybe there's another way to slightly speed up these outputs. > > Taking a similar approach to commit abd84d60eb > ("traci

[RFC PATCH] seq_file: Use seq_puts when seq_printf has only a format with no args

2013-03-16 Thread Joe Perches
Instead of converting the 800 or so uses of seq_printf with a constant format (without a % substitution) to seq_puts, maybe there's another way to slightly speed up these outputs. Taking a similar approach to commit abd84d60eb ("tracing: Optimize trace_printk() with one arg to use trace_puts()") u