mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: cancel the return value check of kvm_arm_init_sve()
@ 2022-05-20  8:49 Peng Wu
  2022-05-21  5:31 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Wu @ 2022-05-20  8:49 UTC (permalink / raw)
  To: maz, james.morse, alexandru.elisei, catalin.marinas, will
  Cc: linux-arm-kernel, kvmarm, linux-kernel, liwei391, yuehaibing, wupeng58

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@huawei.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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-21  5:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20  8:49 [PATCH] KVM: arm64: cancel the return value check of kvm_arm_init_sve() Peng Wu
2022-05-21  5:31 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®