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: 13027483 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D0AEC43219 for ; Tue, 1 Nov 2022 21:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sWzkiutuKXlmOEU3uuF+oyVaox2OfKygmHtKFp5atP4=; b=wXkWice31xz0CN 89qNmlsEb2Xc5OvfBegCvbGLP03OxM5DV5EHl8/Wm6uIh38+ALmHYwHbj92H2M93wuVkmo+o8ZOzB p8NVhgTeL3YEAtBEDFACNGJF4nCkZrSL0KZLuJ6YyS6uuyNrNYzwj1qti0Q2cdguQcWZbToYNmXuM lKtufeT7pcr0l6R5qkDr0M4yGUpPu1lIlg0+9HugOcxfuWmsSklI2ldH6QUw2YorgujLiZ3vG6IWi tRLFV1Z2sFQDHLq7Qa0s+bTb9DErFBNYw8VKbfMjDULw8saPiWhXgzL0JMWxoydJ48QqiQqaUYaF3 2oE+93jTsKiuQwsTZTTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opybc-0077CD-C3; Tue, 01 Nov 2022 21:15:32 +0000 Received: from smtp-15.smtpout.orange.fr ([80.12.242.15] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opybY-00779Z-Ng for linux-arm-kernel@lists.infradead.org; Tue, 01 Nov 2022 21:15:30 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221101_141528_941563_41BCA5C3 X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 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);