24 Aug
2009
24 Aug
'09
9:35 a.m.
On Mon, 24 Aug 2009 09:49:41 +0300 Eduardo Valentin eduardo.valentin@nokia.com wrote:
len += sprintf(buf + len, "[%s] ", *s);
else
len += sprintf(buf + len, "%s ", *s);
- }
- len += sprintf(len+buf, "\n");
Just a tiny thing, add spaces before and after + operator:
- len += sprintf(len + buf, "\n");
- p = memchr(buf, '\n', size);
- len = p ? p - buf : size;
I guess here we have two better options, please use one of these:
- strstrip
- sysfs_streq
Thanks Eduardo. I'll fix the first the one and use the sysfs_streq as it's much cleaner to use.
- spin_lock_irq(&mcbsp->lock);
- for (s = &dma_op_modes[i]; i < ARRAY_SIZE(dma_op_modes); s++, i++)
if (*s && len == strlen(*s) && !strncmp(buf, *s, len))
how about using strnicmp ??
Are there need for case insensitive check? The sysfs_streq is not.
I'll send a new version later this day.
--
Jarkko