Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3006650rwi; Tue, 1 Nov 2022 14:44:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5DEtm66ldULRsNTFDaojxsX+v/9wqCMtpEQbj7Xr39UWoVoybEqfx5868RiTJ/KhDzUAOj X-Received: by 2002:a17:906:8a57:b0:7ad:69fb:3a with SMTP id gx23-20020a1709068a5700b007ad69fb003amr20134692ejc.179.1667339039735; Tue, 01 Nov 2022 14:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667339039; cv=none; d=google.com; s=arc-20160816; b=S1uota0hNouokCj3yPwiK/NYaZ/E6v9sr+HUjmlawYTahXYtww5kEzuOFGmYP1uM/B NLbp2vSAfFkp8zKoODnFSz0hhWzqzw/zz5MTQCKqyZpvzF6B8JNw4eplrCIGrNP5RZTE h+441phcic9Fn4Ts99Ch8gGJU4kLfSYl2DNJPjFN37XehM2FQHx3Ttkla2rp72MLLYnn OefM9y1B7hQKfpzYC1yn5Bq3nIyic+HFS5qzxnDQSQhHj7SKpAEmiPq+6XGUWvjVGYb1 XPbENc2ITxDDYgnq2mSv02V2mgr45uBPKt9DfJzNpo0kTMOUAUAHyDMnc5xCflpi17Nb q0xA== 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=IP+vwpC5w0lgTjJIfly+G6bIfvDlhjiYE9yhpNMCwlM=; b=RVx3gT5qHACoYXrGOmMfZiBEr9ddjFhamuVpT2jjj+wVRPuvXfd0EMQ+BAECZl2x57 vKvhqc7w0aH06o/nul3loNLcC9nS5InESNFqkofCdCixVcd87Q206+9yE9xBAshe2yxx R4zHSof+vanTsevulhkjYW5GR5w+807rd2RVeWZo8cj82RsupmW17wttFZvQbvVBDRiS +FUc8T9xPJfrI2+4vQlQyczpvqiNsnlXkyRwUhCFGAavWW2gIRADoq4JpTULE+2i/zJ4 n4gmAbHL343/E/2S5kn2fZ9JOJpnNmsnsqA6d/5NaMmgT4XWImpMaA86THbp1YE4E6+L Pxiw== 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 q4-20020a50aa84000000b00460f0ff4906si12970779edc.130.2022.11.01.14.43.37; Tue, 01 Nov 2022 14:43:59 -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 S230322AbiKAVQF (ORCPT + 96 others); Tue, 1 Nov 2022 17:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230320AbiKAVPb (ORCPT ); Tue, 1 Nov 2022 17:15:31 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 850991F2C7 for ; Tue, 1 Nov 2022 14:15:17 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybLoWfJW; Tue, 01 Nov 2022 22:15:15 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:15 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-input@vger.kernel.org Subject: [PATCH 12/30] input: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:00 +0100 Message-Id: <4311e9cb62687449f4175e2b062abcd77aada059.1667336095.git.christophe.jaillet@wanadoo.fr> 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=unavailable 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/ --- drivers/input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/input.c b/drivers/input/input.c index ebb2b7f0f8ff..783961df3626 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include "input-compat.h" @@ -1465,7 +1466,7 @@ static ssize_t inhibited_store(struct device *dev, ssize_t rv; bool inhibited; - if (strtobool(buf, &inhibited)) + if (kstrtobool(buf, &inhibited)) return -EINVAL; if (inhibited) -- 2.34.1