From nobody Mon Sep 15 05:52:39 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78F82C3DA78 for ; Sat, 14 Jan 2023 09:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229835AbjANJI0 (ORCPT ); Sat, 14 Jan 2023 04:08:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbjANJIW (ORCPT ); Sat, 14 Jan 2023 04:08:22 -0500 Received: from smtp.smtpout.orange.fr (smtp-24.smtpout.orange.fr [80.12.242.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C529559E6 for ; Sat, 14 Jan 2023 01:08:18 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id GcWNpZ6I1pxjIGcWNpgoWb; Sat, 14 Jan 2023 10:08:17 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 14 Jan 2023 10:08:17 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: linux@rasmusvillemoes.dk, mcgrof@kernel.org, mbenes@suse.cz, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2] kernel/params.c: Use kstrtobool() instead of strtobool() Date: Sat, 14 Jan 2023 10:08:13 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Miroslav Benes --- This patch was already sent as a part of a serie ([1]) that axed all usages of strtobool(). Most of the patches have been merged in -next. I synch'ed with latest -next and re-send the remaining ones as individual patches. Note that the first version was sent to no-one, only mailing lists, because "get_maintainer.pl --nogit-fallback" returns an empty list. Changes in v2: - No change [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wa= nadoo.fr/ Signed-off-by: Christophe JAILLET --- kernel/params.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/params.c b/kernel/params.c index 14d66070757b..6e34ca89ebae 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -4,6 +4,7 @@ =20 */ #include +#include #include #include #include @@ -310,7 +311,7 @@ int param_set_bool(const char *val, const struct kernel= _param *kp) if (!val) val =3D "1"; =20 /* One of =3D[yYnN01] */ - return strtobool(val, kp->arg); + return kstrtobool(val, kp->arg); } EXPORT_SYMBOL(param_set_bool); =20 --=20 2.34.1