Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3053808rwi; Tue, 1 Nov 2022 15:24:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4R+juHz3aWG/f99f91Ng/cIFPtDZx8J2PNxheDVqcWsr7ZD/caO/JBNegTr6RmkWJLCcBQ X-Received: by 2002:a17:906:974e:b0:7ac:baef:7394 with SMTP id o14-20020a170906974e00b007acbaef7394mr19536128ejy.212.1667341454919; Tue, 01 Nov 2022 15:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667341454; cv=none; d=google.com; s=arc-20160816; b=MwRRPnbkiFTamLXCmvMcv7pnMlcM24ohvtVQ/sdCOhH1Eg3zq/4rjl/VKgflhhWtEI UPdhl6YMBG7zTgzHGOHSQEArNHFBb3Q2yu6FyXERueQSIeGtuK8LfykWw7jjMr0f76H2 diEGJLotHSHSvf21fMA9cN3G1UpwEmoNroXUStENsDjGWZxZwUze2JSTPsNHcQqgGCE5 9qO+7QWyRJkCFHTQw6+k6cx3GEP97YSTF/MaZ69nQ1/pd39HaTTGIKB4i+rejoW83C4O NSu8mjq/ZNoPqozUI255JMqzchADGrdJfeqbLzq0GUE67uR2/LRLhQRcVpejyI6poqnQ 9Mww== 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=/qQvwcJvCftC4L7VR70xASdSdyEp8r8/2h7Y8zW9BSg=; b=cCcJfyfgt0J/aZTmO/5L7bsLQ+c9VPuvaCC64OOyoGHpUWebLQ1rT3LL9BeXbtcznV 1G8i0UetxeKBiBcn1dQK1jqbDjUI19flwwdpNlWyAv9Ru/HOptqBTmWH5BmRihpUhM25 MLPQsXeAA7SW5JVmbpR9VgMu80jNF9BEHLGBifPNPSUvIQaj33Ol6hxRiS5/yZs4aE4m idUFS3R/tGIlmB2L07nTu1zG0JPAJjKICbmeCB4gSCkENUUHFTE8qBf49W56tj8RFRnp Qk4qMXHnMfQd1iAD9Nco64VBgkfAk9S55VW+vnaQyorHjr0q9Z3N989OKyzLAmxhs2/s MFcw== 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.23.41; Tue, 01 Nov 2022 15:24:14 -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 S230343AbiKAVQJ (ORCPT + 96 others); Tue, 1 Nov 2022 17:16:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230327AbiKAVPd (ORCPT ); Tue, 1 Nov 2022 17:15:33 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 982FA1F2E1 for ; Tue, 1 Nov 2022 14:15:18 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybNoWfJh; Tue, 01 Nov 2022 22:15:17 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:17 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-pm@vger.kernel.org Subject: [PATCH 14/30] powercap: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:02 +0100 Message-Id: <652abbd70fca17977135754901135a6dad5d636c.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/powercap/powercap_sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c index f0654a932b37..1f968353d479 100644 --- a/drivers/powercap/powercap_sys.c +++ b/drivers/powercap/powercap_sys.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -446,7 +447,7 @@ static ssize_t enabled_store(struct device *dev, { bool mode; - if (strtobool(buf, &mode)) + if (kstrtobool(buf, &mode)) return -EINVAL; if (dev->parent) { struct powercap_zone *power_zone = to_powercap_zone(dev); -- 2.34.1