[PATCH v2 3/7] UBI: accept empty string for vid_hdr_offs parameter

Richard Genoud richard.genoud at gmail.com
Mon Aug 20 09:06:44 EDT 2012


2012/8/20 Artem Bityutskiy <dedekind1 at gmail.com>:
> On Mon, 2012-08-20 at 15:52 +0300, Shmulik Ladkani wrote:
>> Hi Richard,
>>
>> On Mon, 20 Aug 2012 14:09:17 +0200 Richard Genoud <richard.genoud at gmail.com> wrote:
>> > @@ -1292,7 +1292,11 @@ static int __init bytes_str_to_int(const char *str)
>> >     unsigned long result;
>> >
>> >     result = simple_strtoul(str, &endp, 0);
>> > -   if (str == endp || result >= INT_MAX) {
>> > +   if (str == endp)
>> > +           /* empty string, assume it's 0 */
>> > +           return 0;
>
> Please, let's not over-engineer this, do not bother with ",,", use ",0,"
> instead. Just do amend the documentation properly.

ok, I'll drop the patch and change the doc.



More information about the linux-mtd mailing list