Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3010677rwi; Tue, 1 Nov 2022 14:48:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5vszNi9TX7MptsG7lOc/yFmh+SobIacs/LKgWIvUeBQ8Tj8LC/pcXmmFP/AHQJDwBAgi4R X-Received: by 2002:a50:c387:0:b0:461:3ae6:8cdf with SMTP id h7-20020a50c387000000b004613ae68cdfmr20964751edf.131.1667339301586; Tue, 01 Nov 2022 14:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667339301; cv=none; d=google.com; s=arc-20160816; b=b3DiIC9MQu1AnvJ71HRdpu6zV7c2J4LiE725H7BmArUZwetF8fCfOSg2DFxCVCcIUP 1zwKMwNqKQoqXb6oC5BGo0xI+Cy0Mw0ldHIQhSSh5Fnz/tuRXD/h28zqtD434c5Xui7y oSYInOZNFbvoAACRn2GvvTGQMqvRrF3Ba+Y3fIeE/BsQ1pCD2oxJIjttQp7MO0nUvT+y uyRfjwvhedDYB4xPL9DYl5C8GqoaB3qym1+2NlBP+AzgBsnhsINbz/QjWcIDVGQ+js85 YyJ3tndbMd6Xqlc8vPEz5Z7LC5srxq3S/H76EmP7x8+wDQ59hJEp6S2dRlib+NN6neUT f7gg== 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=EyDDolwOgNDtKYREnTcHUKk4QoamW4oLebufnZtZurY=; b=fr0HElHHmVLIl6Nc7NgYv/Oy0dyEszsfTbZ5DC44lFjkiSBYXqCQBNhHxPTcJcn4ZQ oXV7LBNLaWMKZW7XJexfZNhmjrv/WIB0DqzpnWM/ojNqDY9rSUy2s5glxm9+qnFUjAHW vcFCDa4jI5faA/2K0yNPsIIxAM1Ggx935sMkeN21tmGPUen1AiDwbIm028rxDPU3H0IP W7u1DCd2xDte4ptVK390FmtzYdCHaZrtGlCtdQzuaLbr/j0mGEk3RqKyhFM/uF8CgMAO MC2uwEPu/xgJv464xmYVitqM1mK1IyntxSs+S7oBnIyeE+YpH97RH1xsJnvHTGFoKEVF iWFA== 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 gt13-20020a1709072d8d00b007836ec6999dsi15375684ejc.904.2022.11.01.14.47.58; Tue, 01 Nov 2022 14:48:21 -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 S231191AbiKAVRI (ORCPT + 96 others); Tue, 1 Nov 2022 17:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbiKAVQM (ORCPT ); Tue, 1 Nov 2022 17:16:12 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33A101EEC8 for ; Tue, 1 Nov 2022 14:15:34 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybcoWfMO; Tue, 01 Nov 2022 22:15:33 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:33 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Juergen Gross , Boris Ostrovsky , 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 , xen-devel@lists.xenproject.org Subject: [PATCH 28/30] x86/xen: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:16 +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/xen/enlighten_pv.c | 3 ++- arch/x86/xen/setup.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 05170fc19083..9e1ac6a281e4 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -113,7 +114,7 @@ static __read_mostly bool xen_msr_safe = IS_ENABLED(CONFIG_XEN_PV_MSR_SAFE); static int __init parse_xen_msr_safe(char *str) { if (str) - return strtobool(str, &xen_msr_safe); + return kstrtobool(str, &xen_msr_safe); return -EINVAL; } early_param("xen_msr_safe", parse_xen_msr_safe); diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index cfa99e8f054b..0abccdab5bc6 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -85,7 +86,7 @@ static void __init xen_parse_512gb(void) arg = strstr(xen_start_info->cmd_line, "xen_512gb_limit="); if (!arg) val = true; - else if (strtobool(arg + strlen("xen_512gb_limit="), &val)) + else if (kstrtobool(arg + strlen("xen_512gb_limit="), &val)) return; xen_512gb_limit = val; -- 2.34.1