[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220520084911.44253-1-wupeng58@huawei.com>
Date: Fri, 20 May 2022 08:49:11 +0000
From: Peng Wu <wupeng58@...wei.com>
To: <maz@...nel.org>, <james.morse@....com>,
<alexandru.elisei@....com>, <catalin.marinas@....com>,
<will@...nel.org>
CC: <linux-arm-kernel@...ts.infradead.org>,
<kvmarm@...ts.cs.columbia.edu>, <linux-kernel@...r.kernel.org>,
<liwei391@...wei.com>, <yuehaibing@...wei.com>,
<wupeng58@...wei.com>
Subject: [PATCH] KVM: arm64: cancel the return value check of kvm_arm_init_sve()
Currently, kvm_arm_init_sve() has only a unique return value,
so change the return value type of kvm_arm_init_sve() to void.
Meanwhile, there's no need to check the return value of
kvm_arm_init_sve() in kvm_arch_init().
Signed-off-by: Peng Wu <wupeng58@...wei.com>
---
arch/arm64/kvm/arm.c | 4 +---
arch/arm64/kvm/reset.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 400bb0fe2745..5ec90991c68e 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -2206,9 +2206,7 @@ int kvm_arch_init(void *opaque)
if (err)
return err;
- err = kvm_arm_init_sve();
- if (err)
- return err;
+ kvm_arm_init_sve();
err = kvm_arm_vmid_alloc_init();
if (err) {
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index 6c70c6f61c70..abae7b24eb8b 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -43,7 +43,7 @@ static u32 kvm_ipa_limit;
unsigned int kvm_sve_max_vl;
-int kvm_arm_init_sve(void)
+void kvm_arm_init_sve(void)
{
if (system_supports_sve()) {
kvm_sve_max_vl = sve_max_virtualisable_vl();
@@ -65,8 +65,6 @@ int kvm_arm_init_sve(void)
pr_warn("KVM: SVE vector length for guests limited to %u bytes\n",
kvm_sve_max_vl);
}
-
- return 0;
}
static int kvm_vcpu_enable_sve(struct kvm_vcpu *vcpu)
--
2.17.1
Powered by blists - more mailing lists