From patchwork Tue Nov 1 21:14:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13888 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3213371wru; Tue, 1 Nov 2022 14:17:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4wQR5WVjqRUq5rx5YCebW7oOJCIOrNMPeGzR2g6nLnZEHKmyr4s4cd9dJ4qAYiE9vjrq1a X-Received: by 2002:a05:6402:440d:b0:450:de54:3fcf with SMTP id y13-20020a056402440d00b00450de543fcfmr20539102eda.312.1667337475887; Tue, 01 Nov 2022 14:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337475; cv=none; d=google.com; s=arc-20160816; b=rc0BP3GlVWFpgumWjaWKaicvoswfsww6jMLfhIejoEsLpzqpYoCmJJWTDpAvEoXQND 4Wi+pnG+eTBEDV7U6JdHjpKlCDGe/DkpdfCPbpBv6F5ClqBg8gt4X3jX8tDqQrRnrAWo ONlSwRR5UbaFYzI+z2AcMJoeDSKOW17XIa4PINlAV0Fem1dzup3/Tv23kkOENezJuHy5 QkfOlV/MEsdcHllQyoEaHeVVmTNqqhyXijaJuW1YNkCLhKSr5t9K+dBPeZXjshxxjt2x +hYVJIBz1WKKPG+XAmwQLsDt7eAh6rKL9/NrZ+oeYBsMZuxRJtuHeGQWmwzWtomO4gPX zB3w== 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=1RMg03WrkXZ6hg8xXcCxfjXlBKSR4CbIeZuX2/0OsQc=; b=XL8aQ24rMw8fKAtTrl6ovEXhHRDwg94bLeg+8TH8SqKzeLwS41dlEdboTl1ad5Mb0O 9HrlN4lDdgFHJjj7KmpntdeoCLKzCMF40T+1pDBsd7of//R/o0shMCEc340WLG6+hyD4 MbCR4xsOCDWDJGHMO/x0yZWjSdb7NfeNgnWXW7any3rrTjH9SI4UElmz2wMGb9U12rAs Hm3Pi0+ktxmxIRqaUl8EgvNTo3VwUUH5Y9jvX2mfHIBgi7YxktBJYyc2KYLpevirYGWx 58UKKaFs8WBL4HzSiuPFJ+HtVGBLugZcXJyKA/lhoBf3tEgWMMWntju9UoM0PhwhxuJf QWsQ== 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 h20-20020a170906111400b0079194d8b1f6si9739555eja.892.2022.11.01.14.17.31; Tue, 01 Nov 2022 14:17:55 -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 S231160AbiKAVQh (ORCPT + 99 others); Tue, 1 Nov 2022 17:16:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230214AbiKAVPv (ORCPT ); Tue, 1 Nov 2022 17:15:51 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5B111DDFD for ; Tue, 1 Nov 2022 14:15:28 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybXoWfL7; Tue, 01 Nov 2022 22:15:27 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:27 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Catalin Marinas , Will Deacon Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org Subject: [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:12 +0100 Message-Id: <5a1b329cda34aec67615c0d2fd326eb0d6634bf7.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 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?1748330061130412728?= X-GMAIL-MSGID: =?utf-8?q?1748330061130412728?= 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 Acked-by: Catalin Marinas --- 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]. This patch has NOT been compile tested. [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ --- arch/arm64/kernel/cpufeature.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 6062454a9067..271a142b96fa 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -1769,7 +1770,7 @@ kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused) static int __init parse_kpti(char *str) { bool enabled; - int ret = strtobool(str, &enabled); + int ret = kstrtobool(str, &enabled); if (ret) return ret; @@ -2013,7 +2014,7 @@ static bool enable_pseudo_nmi; static int __init early_enable_pseudo_nmi(char *p) { - return strtobool(p, &enable_pseudo_nmi); + return kstrtobool(p, &enable_pseudo_nmi); } early_param("irqchip.gicv3_pseudo_nmi", early_enable_pseudo_nmi);