Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4818980ioa; Wed, 27 Apr 2022 11:48:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9dA288OIdGxFhLd/MeSiOypRbPvAT3VJ0r/OzRi30eOFl4teYNKDo5jsCO/lhanBeJJKS X-Received: by 2002:a17:90b:4a48:b0:1da:1fb3:2f65 with SMTP id lb8-20020a17090b4a4800b001da1fb32f65mr7841278pjb.168.1651085291233; Wed, 27 Apr 2022 11:48:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651085291; cv=none; d=google.com; s=arc-20160816; b=q7AQjw+poRuiek3Q45lYibfIbFe1zWPM+qMp6W3zcXThrE4IhQSlJZfx6V6y71LgOT DelVwsGwhoc2Ib501GCYNNwLCyawmyO2iDPX/0sgbTuE08RHsx4n8hUnn/WafeKpQiOd KaLTK8SxH4AYy4cuVeUtcHX92H+lg/1tSJtjkZCdgyJ5/qdyEEQ+PBg8BH927tJlHI4s S+eMXBaVgigFlajMg4da28v5tg2th+myA7vWBQmNN1rn/u2sOiRm2OtYGMngpWIbvsY9 IBnGxssw6aK5iFCgclrCQUf4p+M5q/7wqeAmwNrWDQXCde4To7T8kfJBsF7Jl+4PA2sK p80g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Rvi/o1fbKb1kGp3W3Hpq6Cgdph8ZZoNwuRiCmIxLQS0=; b=qKsIzhFaX1SVWbmLvqEQli9G5vk2/kziq8S1FpEyZJ25AsAZfAwQDs1l7NIjufaDUC lU0cz0JKHLUegyovxlWX+DarU4uEeXn6IpWo9RVJzBeNUJbZoiCqPLyYzRDRTTV9y0gn J037OOiY9yUNkWRpNsNRseq7hwHNTGwb5f+ekuw+xFX0oESnNCmK9AuE6TX4yD9jO71l dkf015GKDPic8XSuvZ7zlEvVlAaCWjsx6jCcrraTkVPkeiuu40NQshEPDEFx1arkSSOa PLtA6TZFUMX3jFsLqiXv4qbysPa/66W8+mRiF48djLnYDSzTS6C/yW0w3fsTwI1tF2go Adcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pBdisntT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u189-20020a6379c6000000b003ab7e64a1f0si2159092pgc.194.2022.04.27.11.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 11:48:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pBdisntT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A3B643EEE; Wed, 27 Apr 2022 11:18:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244697AbiD0SVZ (ORCPT + 99 others); Wed, 27 Apr 2022 14:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237775AbiD0SVX (ORCPT ); Wed, 27 Apr 2022 14:21:23 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3552343495 for ; Wed, 27 Apr 2022 11:18:12 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id y21so2920156edo.2 for ; Wed, 27 Apr 2022 11:18:12 -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=cBLOy4CjVtTYSqkdBD1+BzQI/I+T8th04xZ5AR2Pm9zHPajdnK88iGVAAvzn2MN356 GKB6KYpCSnr9KuOY/OAqaXenG0lx40py6O1wDq2AIDJ0+QT/fgDxmUwd59D4cPFgRoL4 m2/J/nJHRThDNEXzXG9w/CJ5pwXH4JC3cn5kdIhowiUwZsMgZlZakw5M9QtVczV7+v6C KmEOjGpeaKUsjP/A5VeL/JYlFXTHZxhOubusseKubi6uMXvOx72juSoPOQJVtCFbx+OA aQ3Baey7Up8wdjmxZB3sOvGmhV0NWFlmZuFFqNWxw7HI3QgGhoCgbEGsTyNsxAkbn/Ky I5YA== X-Gm-Message-State: AOAM53365ecqC9g2TeB0FHAtD0KNcvUflVglf1kzk4QQK/Z1yJHDcmIY ogLOqZrhtuu4bAEC4d8vjwvw1f3AgRl2eIhodEo= 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-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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