Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3086773rwi; Tue, 1 Nov 2022 15:56:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5vFJsi4MafM7hE426oTce+ZdDM9yBrAjSHSWJlULlarq9FIZMBuVXo7VxNYvqYDRBVE9uy X-Received: by 2002:a65:6944:0:b0:43c:da07:5421 with SMTP id w4-20020a656944000000b0043cda075421mr19529579pgq.72.1667343362454; Tue, 01 Nov 2022 15:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667343362; cv=none; d=google.com; s=arc-20160816; b=gw4tVKTMzpMFbVLiif2cn9nyOrS1AVCutb2KiZBSKTj+aj7fFTAj+hYgbMhX73I24R nBnnzNPNz9DOUFEx6QfwzwlDeIZ7dm9XVcHhJ20pJQC/uC6b/XK2+vHOjQdyai3ttEUy X93IQ+oOuV/Ks+DlNr97ePY3UFSswV3n4XziMVK5Elxsf5+ZzeatFreKxmrZH+cJ+11r PeHuU5/6/zl/pHCAb/ZDi3cDgm7QRPP0HyHJUfVMxa+4ray//DApPPW2AkO6nJvYlROp 5J/g5xHfplQV/fGHMWFTsf864HiM9quoKYYEq0cdwSq/SvSFLZgSGLHyhcfEuHIaQOUW 2M1A== 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=CN8+PtlO7KiOsINtYgE/A8l2E4VA3JanE9meLumoh4o=; b=P53tYyjL7YYgFP4OYmHqcuPzSyAt/V1CahXRO7klRxN7QepcrnAg9HI6pAT813+JPf fo8qP/Xu4k9UXue3LgqO3fKke5ve2Tx7cvHKejYcNEP7Qsc9Dt9znbknNs5NmM+98iDY Fg/vbF/2lN/AgLHVmLDvBmKAIscL8af5TJcQKe3K9n61cb2XmG9q/bFHG1+eqnFpQhPp 62Kf6TfzElQAu9HwDaUKgtq4zyVG7bYL5q+0yzXyr9liEbBEVdyhUTdje/+T49xLzKjh JGgx5I29FcU5ec/z2N4A8QaD/stGrmmJZdsJ9q9CcmP9QPEaDZ/n/8Zy4ST4HRrrPg/n EKyg== 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 t12-20020a63dd0c000000b0046fb6e0b960si8126802pgg.210.2022.11.01.15.55.50; Tue, 01 Nov 2022 15:56:02 -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 S230006AbiKAVRV (ORCPT + 96 others); Tue, 1 Nov 2022 17:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbiKAVQJ (ORCPT ); Tue, 1 Nov 2022 17:16:09 -0400 Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39BE01DDE6 for ; Tue, 1 Nov 2022 14:15:33 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybaoWfM8; Tue, 01 Nov 2022 22:15:31 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:31 +0100 X-ME-IP: 86.243.100.34 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 27/30] KVM: x86/mmu: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:15 +0100 Message-Id: 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/ --- 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 6f81539061d6..aa45abce7586 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -6641,7 +6642,7 @@ static int set_nx_huge_pages(const char *val, const struct kernel_param *kp) new_val = 1; else if (sysfs_streq(val, "auto")) new_val = get_nx_auto_mode(); - else if (strtobool(val, &new_val) < 0) + else if (kstrtobool(val, &new_val) < 0) return -EINVAL; __set_nx_huge_pages(new_val); -- 2.34.1