Re: [PATCH] Use existing helper to convert "on/off" to boolean

2016-04-29 Thread Minfei Huang
On 04/29/16 at 02:21P, Andrew Morton wrote: > On Fri, 29 Apr 2016 13:47:04 +0800 Minfei Huang wrote: > > > It's more convenient to use existing function helper to convert string > > "on/off" to boolean. > > > > ... > > > > --- a/lib/kstrtox.c > > +++ b/lib/kstrtox.c > > @@ -326,7 +326,7 @@ EXPOR

Re: [PATCH] Use existing helper to convert "on/off" to boolean

2016-04-29 Thread Andrew Morton
On Fri, 29 Apr 2016 13:47:04 +0800 Minfei Huang wrote: > It's more convenient to use existing function helper to convert string > "on/off" to boolean. > > ... > > --- a/lib/kstrtox.c > +++ b/lib/kstrtox.c > @@ -326,7 +326,7 @@ EXPORT_SYMBOL(kstrtos8); > * @s: input string > * @res: result >

Re: [PATCH] Use existing helper to convert "on/off" to boolean

2016-04-29 Thread Michal Hocko
On Fri 29-04-16 17:07:42, Minfei Huang wrote: > On 04/29/16 at 10:04P, Michal Hocko wrote: > > On Fri 29-04-16 13:47:04, Minfei Huang wrote: > > > It's more convenient to use existing function helper to convert string > > > "on/off" to boolean. > > > > But kstrtobool in linux-next only does "This

Re: [PATCH] Use existing helper to convert "on/off" to boolean

2016-04-29 Thread Minfei Huang
On 04/29/16 at 10:04P, Michal Hocko wrote: > On Fri 29-04-16 13:47:04, Minfei Huang wrote: > > It's more convenient to use existing function helper to convert string > > "on/off" to boolean. > > But kstrtobool in linux-next only does "This routine returns 0 iff the > first character is one of 'Yy1

Re: [PATCH] Use existing helper to convert "on/off" to boolean

2016-04-29 Thread Michal Hocko
On Fri 29-04-16 13:47:04, Minfei Huang wrote: > It's more convenient to use existing function helper to convert string > "on/off" to boolean. But kstrtobool in linux-next only does "This routine returns 0 iff the first character is one of 'Yy1Nn0'" so it doesn't know about on/off. Or am I missing

[PATCH] Use existing helper to convert "on/off" to boolean

2016-04-28 Thread Minfei Huang
It's more convenient to use existing function helper to convert string "on/off" to boolean. Signed-off-by: Minfei Huang --- lib/kstrtox.c| 2 +- mm/page_alloc.c | 9 + mm/page_poison.c | 8 +--- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/lib/kstrtox.c b/lib/