From patchwork Tue Nov 1 21:14:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13883 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3213143wru; Tue, 1 Nov 2022 14:17:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yTkZ0bD+LO9kqpudpfLlIrlcYUa7Ofw6XJ4uW6BpQcxWI1ZxOCow/bwMb0wsQdDXCUNE/ X-Received: by 2002:a17:903:3293:b0:186:867b:e24 with SMTP id jh19-20020a170903329300b00186867b0e24mr21328615plb.127.1667337449823; Tue, 01 Nov 2022 14:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337449; cv=none; d=google.com; s=arc-20160816; b=KmaIHQRnqXxskjr/6+evgMTIMTIXRzOVfSd9wHO6SIHnt8B7ymZEX/D3I020ox/S22 MKyKiSuVLNxhpyHJAgKHZOX8ulZoYtkPKysbHPYT2DTX0F959ckzNkG3OMpOoMKy2Fcc dMv7A8VCzJcezH/S4vMMMTCc78Zubs1JdBBJm2rX35F4o6UkoTqh+77uNGdJ4jlux6BP Zam67W/SjKKRi0+RMOVT71/WrWlfep8iMc1TvGUpdIACMvw5X3RV8qr0GDf0k6EQthP8 1P4q5f5ISdaBAUeUNt99vcXVz9daF8IU4ouG6TY1eneKl/3paM54LPbasxvjSXnAbS9r XcJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=TwXEkvGfyOtBAKczOdhhR26X8tAnYWvOfXq8v3I51KI=; b=CsfPrHIBHM0UGWV6PBl83uZs9Upg6hNZndr4OdEX3gOjSfYfrg+jI7L44ibgcSGD43 neYUqklC4UTJlC4UUypZH0r3KQNP9K3vhgzsRhpgLAv157pANcQmFFOlpyhc8QM+/TLK yIVtqdkPx8HFBdhMncfUzY5Gn7ZUD1sy7nriSdaWO3O33X9z4Yiv2P2L96tQ1b9ZJwOG UShHrWWPQJm3l44J70RHZaA0EKZCSWIu8utc03VcqOWU8H+ffxJvVA2bvx/dNcqXb3hd hBdQ+ofa7FgwujpbxSiCvlPwBujv45lJxgfPSFqR60iZgNGRzKEL6TCBPd7BDf6aCx00 COIg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a056a00174b00b0056bac1881basi16889294pfc.316.2022.11.01.14.17.16; Tue, 01 Nov 2022 14:17:29 -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 S229939AbiKAVQZ (ORCPT + 99 others); Tue, 1 Nov 2022 17:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230348AbiKAVPf (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 3B3481F60C for ; Tue, 1 Nov 2022 14:15:23 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybSoWfKN; Tue, 01 Nov 2022 22:15:22 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:22 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 19/30] kernel/params.c: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:07 +0100 Message-Id: <2509facf7472786f1a3af0a5b9070bd5268dbc42.1667336095.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748330033646888625?= X-GMAIL-MSGID: =?utf-8?q?1748330033646888625?= 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/ --- kernel/params.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/params.c b/kernel/params.c index a06f80c56f19..96250d3e201b 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -310,7 +311,7 @@ int param_set_bool(const char *val, const struct kernel_param *kp) if (!val) val = "1"; /* One of =[yYnN01] */ - return strtobool(val, kp->arg); + return kstrtobool(val, kp->arg); } EXPORT_SYMBOL(param_set_bool);