Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752067AbcD3ErZ (ORCPT ); Sat, 30 Apr 2016 00:47:25 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34086 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750870AbcD3ErY (ORCPT ); Sat, 30 Apr 2016 00:47:24 -0400 Date: Sat, 30 Apr 2016 12:47:16 +0800 From: Minfei Huang To: Andrew Morton Cc: labbott@fedoraproject.org, rjw@rjwysocki.net, mgorman@techsingularity.net, mhocko@suse.com, vbabka@suse.cz, rientjes@google.com, kirill.shutemov@linux.intel.com, iamjoonsoo.kim@lge.com, izumi.taku@jp.fujitsu.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: <20160430044716.GA18250@dhcp-128-44.nay.redhat.com> References: <1461908824-16129-1-git-send-email-mnghuan@gmail.com> <20160429142110.b4039a422866754bc914b8b2@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160429142110.b4039a422866754bc914b8b2@linux-foundation.org> 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: 833 Lines: 28 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 @@ EXPORT_SYMBOL(kstrtos8); > > * @s: input string > > * @res: result > > * > > - * This routine returns 0 iff the first character is one of 'Yy1Nn0', or > > + * This routine returns 0 if the first character is one of 'Yy1Nn0', or > > That isn't actually a typo. "iff" is shorthand for "if and only if". > ie: kstrtobool() will not return 0 in any other case. > > Use of "iff" is a bit pretentious but I guess it does convey some > conceivably useful info. > Got it. Thanks for your explanation. Thanks Minfei