On Wed, Jan 13, 2021 at 8:23 PM Barnabás Pőcze <pobrn@xxxxxxxxxxxxxx> wrote: > > Do not handle zero length buffer separately. Use kstrtouint() instead > of sscanf(). ... > - int ret, state; > + int ret; > struct ideapad_private *priv = dev_get_drvdata(dev); > + unsigned int state; Reversed xmas tree order? ... > - if (sscanf(buf, "%i", &state) != 1) > - return -EINVAL; > + ret = kstrtouint(buf, 0, &state); > + if (ret) > + return ret; This seems to me a relaxing case, and should be 10 instead of 0. Am I right about %i? If it's true it's probably minor, but still an ABI breakage. P.S. Same comments for the similar cases. -- With Best Regards, Andy Shevchenko