Message ID | 5a1b329cda34aec67615c0d2fd326eb0d6634bf7.1667336095.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;kartikey406@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <christophe.jaillet@wanadoo.fr> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, 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: <cover.1667336095.git.christophe.jaillet@wanadoo.fr> References: <cover.1667336095.git.christophe.jaillet@wanadoo.fr> 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: <linux-kernel.vger.kernel.org> 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?= |
Series |
Remove strtobool()
|
|
Commit Message
Christophe JAILLET
Nov. 1, 2022, 9:14 p.m. UTC
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 (<linux/kstrtox.h>)
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
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(-)
Comments
On Tue, Nov 01, 2022 at 10:14:12PM +0100, Christophe JAILLET wrote: > 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 (<linux/kstrtox.h>) > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Le 02/11/2022 à 14:46, Catalin Marinas a écrit : > On Tue, Nov 01, 2022 at 10:14:12PM +0100, Christophe JAILLET wrote: >> 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 (<linux/kstrtox.h>) >> >> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > Hi, This has been A-b 2 months ago, and I've just resent patches in this serie that have neither been merged in -next, nor A-b or R-b. So for this one, it is just a polite reminder. :) Do you have visibility on when it should be merged? CJ
On Sat, Jan 14, 2023 at 02:29:46PM +0100, Christophe JAILLET wrote: > Le 02/11/2022 à 14:46, Catalin Marinas a écrit : > > On Tue, Nov 01, 2022 at 10:14:12PM +0100, Christophe JAILLET wrote: > > > 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 (<linux/kstrtox.h>) > > > > > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > > > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > > This has been A-b 2 months ago, and I've just resent patches in this serie > that have neither been merged in -next, nor A-b or R-b. > > So for this one, it is just a polite reminder. :) > > Do you have visibility on when it should be merged? When large tree-wide series turn up on the list, there's always a confusion on how they'd get merged. I guess you are expecting such patches to go in via individual maintainer trees. It wasn't obvious from to me (I can now see there was some text in the patch description). I'll add it to my list for 6.3.
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 <linux/bsearch.h> #include <linux/cpumask.h> #include <linux/crash_dump.h> +#include <linux/kstrtox.h> #include <linux/sort.h> #include <linux/stop_machine.h> #include <linux/sysfs.h> @@ -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);