[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YmleidxlL2/d859f@smile.fi.intel.com>
Date: Wed, 27 Apr 2022 18:17:29 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Jagdish Gediya <jvgediya@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Jonathan.Cameron@...wei.com, adobriyan@...il.com,
akpm@...ux-foundation.org, rf@...nsource.cirrus.com,
pmladek@...e.com, ying.huang@...el.com, dave.hansen@...el.com
Subject: Re: [PATCH v2 2/2] mm: Covert sysfs input to bool using kstrtobool()
On Tue, Apr 26, 2022 at 10:30:40PM +0530, Jagdish Gediya wrote:
> Sysfs input conversion to corrosponding bool value e.g. "false" or "0"
> to false, "true" or "1" to true are currently handled through strncmp
> at multiple places. Use kstrtobool() to convert sysfs input to bool
> value.
...
> + if (kstrtobool(buf, &numa_demotion_enabled))
> return -EINVAL;
Hmm... The commit message doesn't explain what's wrong with the error codes
returned by kstrtobool(). Can't it be
ret = kstrtobool();
if (ret)
return ret;
?
...
> + if (kstrtobool(buf, &enable_vma_readahead))
> return -EINVAL;
Ditto.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists