Re: [PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2015-01-29 Thread Steven Rostedt
On Thu, 29 Jan 2015 10:16:16 +0100 Rasmus Villemoes wrote: > Steven, you've been doing some cleanup in this area, among other things > trying to make all the seq_* functions return void. Could you fill me in > on the status of that? Yes, the entire seq_*() operations are ambiguous in how they ha

Re: [PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2015-01-29 Thread Rasmus Villemoes
On Thu, Jan 29 2015, Finn Thain wrote: > I have one reservation about this patch series. > > For example, the changes, > > - seq_printf(m, "%s", p); > + seq_puts(m, p); > > These calls are not equivalent because the bounds check is not the same. > seq_puts will fail when m->count + strle

Re: [PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2015-01-28 Thread Finn Thain
I have one reservation about this patch series. For example, the changes, - seq_printf(m, "%s", p); + seq_puts(m, p); These calls are not equivalent because the bounds check is not the same. seq_puts will fail when m->count + strlen(p) == m->size. seq_write() does the same check a

Re: [PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2015-01-21 Thread Rasmus Villemoes
On Wed, Dec 03 2014, Rasmus Villemoes wrote: > These patches mostly replace seq_printf with simpler and faster > equivalents, e.g. seq_printf(m, "something") => seq_puts(m, > "something") and seq_printf(m, "\n") => seq_putc(m, '\n). But before > my Coccinelle scripts could be unleashed I had to c

[PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2014-12-02 Thread Rasmus Villemoes
These patches mostly replace seq_printf with simpler and faster equivalents, e.g. seq_printf(m, "something") => seq_puts(m, "something") and seq_printf(m, "\n") => seq_putc(m, '\n). But before my Coccinelle scripts could be unleashed I had to clean up an unnecessary macro. The patches don't change