From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 982FAC433F5 for ; Wed, 27 Apr 2022 18:18:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F1DD16B0071; Wed, 27 Apr 2022 14:18:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EA44D6B0073; Wed, 27 Apr 2022 14:18:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1F286B0074; Wed, 27 Apr 2022 14:18:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id BCCA76B0071 for ; Wed, 27 Apr 2022 14:18:12 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8A2082166E for ; Wed, 27 Apr 2022 18:18:12 +0000 (UTC) X-FDA: 79403468424.12.EBBABD2 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by imf03.hostedemail.com (Postfix) with ESMTP id 572602004D for ; Wed, 27 Apr 2022 18:18:08 +0000 (UTC) Received: by mail-ed1-f47.google.com with SMTP id g20so2903305edw.6 for ; Wed, 27 Apr 2022 11:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rvi/o1fbKb1kGp3W3Hpq6Cgdph8ZZoNwuRiCmIxLQS0=; b=pBdisntTtPoXxlIXySp5mL/t1MbXSPXNh6/5Su37ufFnYiIhDuZSj6PNsnAX4XZOLz wQ8huaEX1oU3I7XFZw/Ephk0aHFyOqLMy6HJ+qQsjgLt+7ga3TKPq50ym1KPFsiHOcJf cmKLTdWjFqeZ/Fshqy0yokQrA/Cp+J+hwh03cA9o1LD+eEYm54Uc/HWd57WPWRsuutZu M08bIihmHF//JVjnWsmU0LWu4iOPG9/w7GWALV2iWzeaQCjROcGlrQj/Ub7NTafB1uee Fd0wiFhLFvKQ/ipDrnztrQy5asxgirYq4jw81hfxrQDlzPmYlMt43yhUTsrBt4mg5QCC mB6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rvi/o1fbKb1kGp3W3Hpq6Cgdph8ZZoNwuRiCmIxLQS0=; b=FWX9351erg9oReFp0bmgCMS7zlZ6T56uvE1Ay3pZvM2WNnupbWHnTWWDndkyeeD3Ak Trmiff2YlvlkKUFgK6VYTPmSZlSrDZfVmsBIXtbgfcJiKzCGjmpXiGzB5W0To0xi45po 3iQlfOESlwc8E7HiyRdzTJJqm6FaQW8OibLoYUpVfJrhGEUTEV9CXlAR2siB4QIc2nus TzEH4MnjM3InxxYTWBEFhL71Tsc+/aNcWoVXgyaiknxdV77Cm6uBmcA6AR9G+p2W2ihO hah3U7rMjBN+YCcceixv1wEA0Bq3FN9VK5eziPYAJcjv17KhS+zN8vYYH+sMVMneRl5z AvSQ== X-Gm-Message-State: AOAM531y4ce80XxN6Xd9uigjp2TH9ciSFpErO7xaA/tn++ytT2GkEEIu wD9mtPDxrLUO0InzN0WnxV8Wpd8WhqKAOVEZfCo= X-Google-Smtp-Source: ABdhPJwBg5JBuCYhr2CwOxgiJIV7XYFH0Ov9PfOGsOLwVUduuD7nLUnyG1DDrABzRJ0dxX4lKJYGEr2O60HVzgyzwxI= X-Received: by 2002:a05:6402:d51:b0:425:d5e1:e9f0 with SMTP id ec17-20020a0564020d5100b00425d5e1e9f0mr23229672edb.125.1651083490635; Wed, 27 Apr 2022 11:18:10 -0700 (PDT) MIME-Version: 1.0 References: <20220426180203.70782-1-jvgediya@linux.ibm.com> <20220427103901.7567e7058dcaa3068056b2ed@linux-foundation.org> In-Reply-To: <20220427103901.7567e7058dcaa3068056b2ed@linux-foundation.org> From: Andy Shevchenko Date: Wed, 27 Apr 2022 20:17:34 +0200 Message-ID: Subject: Re: [PATCH v3 1/2] lib/kstrtox.c: Add "false"/"true" support to kstrtobool() To: Andrew Morton Cc: Andy Shevchenko , Jagdish Gediya , Linux Kernel Mailing List , linux-mm , Matthew Wilcox , ying.huang@intel.com, Dave Hansen , Jonathan Cameron , Alexey Dobriyan , Richard Fitzgerald , Petr Mladek Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: 467y7ea1gsestsstxh499bsuufuan4so X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 572602004D X-Rspam-User: Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pBdisntT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of andy.shevchenko@gmail.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=andy.shevchenko@gmail.com X-HE-Tag: 1651083488-110930 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 27, 2022 at 8:06 PM Andrew Morton wrote: > > On Wed, 27 Apr 2022 18:13:43 +0300 Andy Shevchenko wrote: > > > On Tue, Apr 26, 2022 at 11:32:02PM +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 > > > > corresponding > > > > > 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 > > > currently it doesn't have support to accept "false"/"true". > > > > > > Add support to accept "false"/"true" as valid string in kstrtobool(). > > > > Andrew, this patch still needs a bit of work. > > I fixed the two issues you identified in this email. Is there more to do? I think the rest is fine, esp. taking into account Matthew's review. Feel free to add Reviewed-by: Andy Shevchenko (It might be better to check the second character as well to be sure we avoid typos like 'talse' and 'frue', anyone to comment?) -- With Best Regards, Andy Shevchenko