From patchwork Tue Nov 1 21:14:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3216357wru; Tue, 1 Nov 2022 14:23:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6PwpdRBs9ZIsXWxJgt2cEWkivPbLx6gXO+TQ8LmdiQsMTDLKMkdzPufoNb4TwZdBGj5V4+ X-Received: by 2002:a05:6402:274c:b0:461:9921:60cf with SMTP id z12-20020a056402274c00b00461992160cfmr21720392edd.353.1667337813392; Tue, 01 Nov 2022 14:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337813; cv=none; d=google.com; s=arc-20160816; b=j4fUZKj05tPcOMjry4eOKRiYyUfZumV9KZPjr/uE/hYFEfacn8RIn5g9fNOLRJfk41 aaHniXgbZDpaF7usgwfHmpX+ZETnBE1fuctaUj9zzTZGs01i8puSlf9eaa5DL0bYcmfl /NVXuJqhobJIEahExJuc/N4YdVToGr8vAZjNcZxh3xhC56gZ2vqUvrfkbrzCcWMGVJm8 MKt13E3sNgo02tgfmVQ9zhoUJ47PhigPna+oyRFJY98yHOMOwf+QP++FrdniXDKcURyk 5R6B3V5JFynXNnF+bgqMEEJV6J/gnfzCCkR2iJIIOr5GAnODzjTCtT+c6tYnpgHz96GS ksZQ== 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=k8sYOXxet2QN1PpBdnkRnyIgPYio9W6hvDIOa3jHXl4=; b=ijzhT7Y5XZrB/x4ic+8CKXdUT0wZGp4BeU7CGscDelN57lh7RGbXEILdozbKhqTs85 DUGH5rhTIaINgZ4Uf4+W+nuVo6LQBXOMMkri+9PaC1JgynF3PSMhL0GqR/1P7CudeBAZ TwP2k9pCOYZI7SbJ/Bq2/H0giV3X0d9phs6yJgfjmCVbP0azKM7CHuT+tqaLgSexZ2pn +pSiMEAyogdcK+ticiNZyPRL+NpzT/R7YhBmGvZ7yFFw/LWSEftqW22wawGA1nlUBxLq 7wWBlLEbC8X6tKqTnd+26GCfVTLDmPAKmhxEnrYFTjISq2J1o9zZ1+OJfIB6e09U+dQf uv+w== 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 e6-20020a50ec86000000b00461a32e0e38si9924524edr.306.2022.11.01.14.23.09; Tue, 01 Nov 2022 14:23:33 -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 S230516AbiKAVR1 (ORCPT + 99 others); Tue, 1 Nov 2022 17:17:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230460AbiKAVQJ (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 D319D1EC7E for ; Tue, 1 Nov 2022 14:15:30 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybYoWfLE; Tue, 01 Nov 2022 22:15:29 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:29 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Catalin Marinas , Will Deacon Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu Subject: [PATCH 25/30] KVM: arm64: vgic-v3: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:13 +0100 Message-Id: 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=unavailable 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?1748330415068037905?= X-GMAIL-MSGID: =?utf-8?q?1748330415068037905?= 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]. This patch has NOT been compile tested. [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ --- arch/arm64/kvm/vgic/vgic-v3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c index 826ff6f2a4e7..efb2726efbb3 100644 --- a/arch/arm64/kvm/vgic/vgic-v3.c +++ b/arch/arm64/kvm/vgic/vgic-v3.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -587,25 +588,25 @@ DEFINE_STATIC_KEY_FALSE(vgic_v3_cpuif_trap); static int __init early_group0_trap_cfg(char *buf) { - return strtobool(buf, &group0_trap); + return kstrtobool(buf, &group0_trap); } early_param("kvm-arm.vgic_v3_group0_trap", early_group0_trap_cfg); static int __init early_group1_trap_cfg(char *buf) { - return strtobool(buf, &group1_trap); + return kstrtobool(buf, &group1_trap); } early_param("kvm-arm.vgic_v3_group1_trap", early_group1_trap_cfg); static int __init early_common_trap_cfg(char *buf) { - return strtobool(buf, &common_trap); + return kstrtobool(buf, &common_trap); } early_param("kvm-arm.vgic_v3_common_trap", early_common_trap_cfg); static int __init early_gicv4_enable(char *buf) { - return strtobool(buf, &gicv4_enable); + return kstrtobool(buf, &gicv4_enable); } early_param("kvm-arm.vgic_v4_enable", early_gicv4_enable);