mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
RISC-V: KVM: Make kvm_riscv_guest_timer_init a void function
It can never fail so convey that fact explicitly by making the function void. Also in kvm_arch_init_vm it makes it clear that there no need to do any cleanup after kvm_riscv_gstage_vmid_init has been called. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
6259d2f834
commit
cca986fab9
@ -39,6 +39,6 @@ int kvm_riscv_vcpu_timer_init(struct kvm_vcpu *vcpu);
|
||||
int kvm_riscv_vcpu_timer_deinit(struct kvm_vcpu *vcpu);
|
||||
int kvm_riscv_vcpu_timer_reset(struct kvm_vcpu *vcpu);
|
||||
void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu);
|
||||
int kvm_riscv_guest_timer_init(struct kvm *kvm);
|
||||
void kvm_riscv_guest_timer_init(struct kvm *kvm);
|
||||
|
||||
#endif
|
||||
|
@ -214,12 +214,10 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)
|
||||
#endif
|
||||
}
|
||||
|
||||
int kvm_riscv_guest_timer_init(struct kvm *kvm)
|
||||
void kvm_riscv_guest_timer_init(struct kvm *kvm)
|
||||
{
|
||||
struct kvm_guest_timer *gt = &kvm->arch.timer;
|
||||
|
||||
riscv_cs_get_mult_shift(>->nsec_mult, >->nsec_shift);
|
||||
gt->time_delta = -get_cycles64();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -41,7 +41,9 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
|
||||
return r;
|
||||
}
|
||||
|
||||
return kvm_riscv_guest_timer_init(kvm);
|
||||
kvm_riscv_guest_timer_init(kvm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void kvm_arch_destroy_vm(struct kvm *kvm)
|
||||
|
Loading…
Reference in New Issue
Block a user