From nobody Mon Sep 15 05:54:03 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 89AC7C3DA78 for ; Sat, 14 Jan 2023 09:39:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229667AbjANJjb (ORCPT ); Sat, 14 Jan 2023 04:39:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbjANJjZ (ORCPT ); Sat, 14 Jan 2023 04:39:25 -0500 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D14791BF for ; Sat, 14 Jan 2023 01:39:24 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id Gd0Qp24IHA7XxGd0RpTOKO; Sat, 14 Jan 2023 10:39:23 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 14 Jan 2023 10:39:23 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , kvm@vger.kernel.org Subject: [PATCH v2] KVM: x86/mmu: Use kstrtobool() instead of strtobool() Date: Sat, 14 Jan 2023 10:39:11 +0100 Message-Id: <670882aa04dbdd171b46d3b20ffab87158454616.1673689135.git.christophe.jaillet@wanadoo.fr> 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 --- 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. Changes in v2: - synch with latest -next. [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wa= nadoo.fr/ --- arch/x86/kvm/mmu/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 9c7198544195..699f7eac5070 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -43,6 +43,7 @@ #include #include #include +#include #include =20 #include @@ -6752,7 +6753,7 @@ static int set_nx_huge_pages(const char *val, const s= truct kernel_param *kp) new_val =3D 1; else if (sysfs_streq(val, "auto")) new_val =3D get_nx_auto_mode(); - else if (strtobool(val, &new_val) < 0) + else if (kstrtobool(val, &new_val) < 0) return -EINVAL; =20 __set_nx_huge_pages(new_val); --=20 2.34.1