lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] lib/kstrtox.c: Add "false"/"true" support to kstrtobool
On Tue, Apr 26, 2022 at 04:27:01PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 26, 2022 at 12:10:01PM +0530, Jagdish Gediya wrote:
> > At many places in kernel, It is necessary to convert sysfs input
> > to corrosponding bool value e.g. "false" or "0" need to be converted
> > to bool false, "true" or "1" need to be converted to bool true,
> > places where such conversion is needed currently check the input
> > string manually, kstrtobool can be utilized at such places but
>
> kstrtobool()
>
> > currently kstrtobool doesn't have support to "false"/"true".
>
>
> Ditto.
>
> > Add "false"/"true" support to kstrtobool while string conversion
>
> Ditto.
>
> > to bool. Modify existing manual sysfs conversions to use kstrtobool().
>
> > This patch doesn't have any functionality change.
>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Cc: Richard Fitzgerald <rf@opensource.cirrus.com>
> > Cc: Petr Mladek <pmladek@suse.com>
>
> You may use --cc parameter to `git send-email`.
Sure, Will remove these from here.
> ...
>
> > lib/kstrtox.c | 7 +++++++
> > mm/migrate.c | 6 +-----
> > mm/swap_state.c | 6 +-----
>
> Please, split to two.
Sure
> Also Documentation update is missed.
I am not finding any related documentation. I can update
the comment on the function for true/false change.

--Jagdish
>
>
>

\
 
 \ /
  Last update: 2022-04-26 16:22    [W:0.080 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site