Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753089AbcD2JVu (ORCPT ); Fri, 29 Apr 2016 05:21:50 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:38549 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753037AbcD2JVr (ORCPT ); Fri, 29 Apr 2016 05:21:47 -0400 Date: Fri, 29 Apr 2016 11:21:45 +0200 From: Michal Hocko To: Minfei Huang Cc: akpm@linux-foundation.org, labbott@fedoraproject.org, rjw@rjwysocki.net, mgorman@techsingularity.net, vbabka@suse.cz, rientjes@google.com, kirill.shutemov@linux.intel.com, iamjoonsoo.kim@lge.com, izumi.taku@jp.fujitsu.com, alexander.h.duyck@redhat.com, hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Use existing helper to convert "on/off" to boolean Message-ID: <20160429092145.GC21977@dhcp22.suse.cz> References: <1461908824-16129-1-git-send-email-mnghuan@gmail.com> <20160429080430.GA21977@dhcp22.suse.cz> <20160429090742.GA16688@dhcp-128-44.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160429090742.GA16688@dhcp-128-44.nay.redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 917 Lines: 27 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 routine returns 0 iff the > > first character is one of 'Yy1Nn0'" so it doesn't know about on/off. > > Or am I missing anything? > > Hi, Michal. > > Thanks for your reply. > > Following is the kstrtobool comment from linus tree, which has explained > that this function can parse "on"/"off" string. Also Kees Cook has > posted such patch to fix this issue as well. So I think it's safe to fix > it. OK, I was looking at wrong tree and missed a81a5a17d44b ("lib: add "on"/"off" support to kstrtobool") Sorry about the confusion. Feel free to add Acked-by: Michal Hocko -- Michal Hocko SUSE Labs