From patchwork Sat Jan 14 13:26:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 43754 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp282939wrn; Sat, 14 Jan 2023 05:28:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXu/cR7+mLITxNnXckl7S7k/xbRW2NN5YUQyjxZJFcLo4I+/TE5pWNvd4TryC9jfi9GZMgNR X-Received: by 2002:a05:6a20:12ca:b0:ab:e8a7:6137 with SMTP id v10-20020a056a2012ca00b000abe8a76137mr121226692pzg.3.1673702895722; Sat, 14 Jan 2023 05:28:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673702895; cv=none; d=google.com; s=arc-20160816; b=xc76nrSAiQZAnDVfExOI6+zIndb1hEs9bJ3N0sPieWvI2JJJMrgVZFe8wixitClubx 3bqdc+HkEOkbxRUkKG2CoEPiQ//r/zgbNup59nKwPi9AH0gzr1E8vt+Tg9zscmd5vfhS /99anovbX8RBeBqHeSr4w7WmJmJ4leYw9vfLg9OnAlUJ95PMyiyHgG2ORw969k8Y42KZ Nn3jUTBeK6hSwxmI8WDUTO0EGn3fYX6z33Gi9lvmLKjOml7YvC2b9xXDwyMJlWzyNDiZ 3g3jZzKqL81fxBq0lT7rR0cA3TV6IwA1wyvls4Ub2k6hS0d2uMWHV4p3ufzN93nahf+k nLMw== 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 :message-id:date:subject:cc:to:from; bh=15GtZh2VBmP+guHbNrYu/mxF1KRMvzNkEXYQSJuBLOc=; b=RUYXFJl8lE8uWWY/Lh1XXCs/QymEbVMyK8KSEgk1IXr7KR09yRXJo8UrI3U6ibF4eh 0nYnQH3T7eLEuPKAQGkbRD7NPPli3XVBSVn4HRjqlbkEWRIhzsBVbuIzctKcEepqgF7z r2f+yY5MYCuzB6xZ57LG/rOHJWVfV0x0Ny47LXMGA9ufeKLnVGTL2UmpctP5KVf5VWlX V9b2MC5MwyI5T/YgT5Oy5SfaTQPt94zlFWmqej14ejGEFhsnkYkn9Cq88de/jEOI+Bst 3tSTbDCMBHP+DmRwWT6OaTQZycMFexbCQYo6q9hM/ZzYB9gRccSJPikcOEdQFURYJh89 TGTg== 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 v29-20020a63b95d000000b004b980d584eesi10396163pgo.49.2023.01.14.05.28.01; Sat, 14 Jan 2023 05:28:15 -0800 (PST) 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 S229807AbjANN0c (ORCPT + 99 others); Sat, 14 Jan 2023 08:26:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjANN03 (ORCPT ); Sat, 14 Jan 2023 08:26:29 -0500 Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7097059F5 for ; Sat, 14 Jan 2023 05:26:25 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id GgY7pvKxtsfAHGgY7pSjYQ; Sat, 14 Jan 2023 14:26:23 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 14 Jan 2023 14:26:23 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Marc Zyngier , James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , 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 v2] KVM: arm64: vgic-v3: Use kstrtobool() instead of strtobool() Date: Sat, 14 Jan 2023 14:26:15 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 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?1755004687763799861?= X-GMAIL-MSGID: =?utf-8?q?1755004687763799861?= 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 Reviewed-by: Zenghui Yu --- This patch was already sent as a part of a serie ([1]) that axed all usages of strtobool(). Most of the patches have been merged in -next. I synch'ed with latest -next and re-send the remaining ones as individual patches. Changes in v2: - now compile tested with make.cross, ARCH=arm64 and compiler from https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64/ [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 2074521d4a8c..9d63149d9e53 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);