Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3055012rwi; Tue, 1 Nov 2022 15:25:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67zwz3aSxF1kM22skCkwQ+x9g2fmE82MQn+ilELiQeT7/eixYAD1iEnOZtSQ7jzcBffWZD X-Received: by 2002:a17:906:974e:b0:7ac:baef:7394 with SMTP id o14-20020a170906974e00b007acbaef7394mr19539942ejy.212.1667341527075; Tue, 01 Nov 2022 15:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667341527; cv=none; d=google.com; s=arc-20160816; b=MtRkpfg2GkeYdHMFft46Z+3opUcHVERghhbkH4Wy3SJzeGCOHO+AY4GFIRhCwyO8PX jsVSTNagpCLlPegycYSEbsmfdANXNnXI6cBxMjo0y53gPx+1kJ+Qy6GTkWOlMQhRYIvU nqE1tBRqN3bmq45OsSXQO54gxeqt+blKQgxf0lTbIKbDBfAOTyQ/Wf6Cv4q7INT+lO+i LruzWYYtWEoQJlQT4LyWb8d54+rUB369OTJM3aoLnOev04i1YHqDlA/dObuuv2F0hPyV VZV6nQWCte3O10NZ5HvKFUYKSNe/MAgFJOLwJ/pfl4Jznyt9WJpYjkkrl0/N+zX8xMOt OPJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=k/nvnbjuHwpnlrbze4dbBp+/fMdDlovpjS9b7UrE33A=; b=ahRRo4EoAxRtCRh7NPP/BO+mCbNTpkTOuCvLz76soaLcnGalsNlC+PW9LTx7xlADKT kMItjTJ3S2l1RRyiRgZpNdxcfcYI1AAkIo1RxYAqewtkCyfOtf3/xIum0orFqjwWS6zx HXaenPKzBlG5LoKM+gPyDnFl4yjNLwxpDFVuuacDuUqzWpKQ2eYqV/VT8XXzbGsB5fho ysXT0Vi0YUu6d8TVes3c8fdTA7KPS3osFpBYMIHqei0hikbqPmjHc7DY7L1W56R71r3p vxttrbY0soFVT84fXmaG2I4mB4u6yq98WMaTBas8t7qN6rx45Y6tA2A4mls3EJLY4BUM 4IZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h20-20020a170906111400b007ad8ba75a29si10129938eja.359.2022.11.01.15.24.54; Tue, 01 Nov 2022 15:25:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230504AbiKAVQU (ORCPT + 96 others); Tue, 1 Nov 2022 17:16:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230347AbiKAVPf (ORCPT ); Tue, 1 Nov 2022 17:15:35 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F31D21F600 for ; Tue, 1 Nov 2022 14:15:22 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybPoWfJx; Tue, 01 Nov 2022 22:15:20 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:20 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org Subject: [PATCH 16/30] cifs: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:04 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET --- This patch is part of a serie that axes all usages of strtobool(). Each patch can be applied independently from the other ones. The last patch of the serie removes the definition of strtobool(). You may not be in copy of the cover letter. So, if needed, it is available at [1]. [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ --- fs/cifs/cifs_debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 90850da390ae..4f1b3a65e74c 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -779,7 +780,7 @@ static ssize_t cifsFYI_proc_write(struct file *file, const char __user *buffer, rc = get_user(c[0], buffer); if (rc) return rc; - if (strtobool(c, &bv) == 0) + if (kstrtobool(c, &bv) == 0) cifsFYI = bv; else if ((c[0] > '1') && (c[0] <= '9')) cifsFYI = (int) (c[0] - '0'); /* see cifs_debug.h for meanings */ @@ -939,7 +940,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file, if (count < 3) { /* single char or single char followed by null */ - if (strtobool(flags_string, &bv) == 0) { + if (kstrtobool(flags_string, &bv) == 0) { global_secflags = bv ? CIFSSEC_MAX : CIFSSEC_DEF; return count; } else if (!isdigit(flags_string[0])) { -- 2.34.1