Thread (2 messages) flat view 2 messages, 2 authors, 2018-10-08
STALE2898d

[PATCH] KVM: arm64: remove the unnecessary function check

From: Shaokun Zhang <hidden>
Date: 2018-08-31 09:42:59
Also in: kvmarm
Subsystem: kernel virtual machine (kvm), the rest · Maintainers: Paolo Bonzini, Linus Torvalds

init_common_resources always return 0 and it is redundant to check the
return value, let's make it void to simplify the code.

Cc: Christoffer Dall <redacted>
Cc: Marc Zyngier <redacted>
Signed-off-by: Shaokun Zhang <redacted>
---
 virt/kvm/arm/arm.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index c92053b..66a29c9 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -1406,13 +1406,11 @@ static inline void hyp_cpu_pm_exit(void)
 }
 #endif
 
-static int init_common_resources(void)
+static void init_common_resources(void)
 {
 	/* set size of VMID supported by CPU */
 	kvm_vmid_bits = kvm_get_vmid_bits();
 	kvm_info("%d-bit VMID\n", kvm_vmid_bits);
-
-	return 0;
 }
 
 static int init_subsystems(void)
@@ -1655,9 +1653,7 @@ int kvm_arch_init(void *opaque)
 		}
 	}
 
-	err = init_common_resources();
-	if (err)
-		return err;
+	init_common_resources();
 
 	in_hyp_mode = is_kernel_in_hyp_mode();
 
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help