Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3008337rwi; Tue, 1 Nov 2022 14:45:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5AcO+8DzjjXkX6RBERU6R9NGDi6gujflrmlejce/U/i6fc49CGNTe12hLnU/q40KFwGNqc X-Received: by 2002:a17:907:a46:b0:782:1c1c:8141 with SMTP id be6-20020a1709070a4600b007821c1c8141mr20791954ejc.549.1667339151410; Tue, 01 Nov 2022 14:45:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667339151; cv=none; d=google.com; s=arc-20160816; b=R75mIoKe9gPEq9fepC8vWn4C3fJ9HTMp8jzMw9CckzCIT7+YFN45/2LD4OkQASSfMR FR9DbKMdormlHVinC4cBrfbIMxmtkQfcYwBL2adWAwRmaJJ7hrJmegVdl0YXiSzo1JKW ljBpCAmGinp+JIfX2D9JDjR/W7oSad2zUxay4jLOAOBoLwxl6hUkSfXO6X1YxWI/jv/i qvQ6M4pHByBNDRIJhiOCXjJJV9oYNwM8WohXFUk5c3b0HJn1zdwx2IeFYeGNnXsODeni zo7HJIE3GZO+pKmLajxHHS+lV8I6p6NUH1gUqMF2Z/rFufNMwe63wOTqk6ZlVsOigod8 FpGw== 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=4vKYVAdFkbmag/c8DV8HEihHus8WOUMIp9jbywGlKRs=; b=LSqWUP65iktM3HcRJIsr6sd2ir21xBB12dLbdGIYPAAyEpWBGfiBXhMZuOfApRtpqN umR4+Y1sa/e19WRs9F/ZK826Uh1dLpwMdS151a2dcrEnzWx+K4CQNUICGaSkgzoEdRyo BPGPs5KrWBg1ZG+nV4cvO5d44TO31gZiPEpFgoKpYtFGPAaCZYK4VKiADmxFr9b91y6o /Q0cH3GIqJyo4Ti8c9/UfU/Uhwe6tH34VdWiFxNr5UbkA+wehqbMuU3lr3lM5RSJTEDk u1YhvPfVBpjDhaRVjpDEJITV5aZGg0YX+FMvt+aHQTgzkWm1HNCduS2ioeDCulE3Nf87 ZG0g== 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 gn3-20020a1709070d0300b0078debc9d30esi14808894ejc.29.2022.11.01.14.45.28; Tue, 01 Nov 2022 14:45:51 -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 S230345AbiKAVQM (ORCPT + 96 others); Tue, 1 Nov 2022 17:16:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbiKAVPd (ORCPT ); Tue, 1 Nov 2022 17:15:33 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E672A1F2D9 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 pyanoKD2rsfCIpybMoWfJb; Tue, 01 Nov 2022 22:15:16 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:16 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Benson Leung , Guenter Roeck Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , chrome-platform@lists.linux.dev Subject: [PATCH 13/30] platform/chrome: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:01 +0100 Message-Id: <8d66b4688c05a44b592a4d20e2660e9067163276.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=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/ --- drivers/platform/chrome/cros_ec_lightbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c index 469dfc7a4a03..58beb2a047b2 100644 --- a/drivers/platform/chrome/cros_ec_lightbar.c +++ b/drivers/platform/chrome/cros_ec_lightbar.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -493,7 +494,7 @@ static ssize_t userspace_control_store(struct device *dev, bool enable; int ret; - ret = strtobool(buf, &enable); + ret = kstrtobool(buf, &enable); if (ret < 0) return ret; -- 2.34.1