Re: [PATCH] avr32: replace simple_strtoul() with kstrtoul()

From: Alexey Dobriyan
Date: Wed Mar 19 2014 - 05:52:45 EST


> - val = simple_strtoul(buf, &endp, 0);
> - if (endp == buf || val > 0x3f)
> - return -EINVAL;
> + ret = kstrtoul(buf, 0, &val);
> + if (ret)
> + return ret;
> val = (val << 12) | (sysreg_read(PCCR) & 0xfffc0fff);

you removed 0x3f check

this conversion is not trivial as it seems
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/