diff options
author | Dominik Dingel <dingel@linux.vnet.ibm.com> | 2014-12-04 09:47:07 -0500 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2015-01-23 07:24:52 -0500 |
commit | 31928aa5863e71535ee942f506ca9ac8ce1c4315 (patch) | |
tree | 00cf453d0286079f990d9f2d221b5992346c2271 | |
parent | bab5bb398273bb37547a185f7b344b37c700d0b9 (diff) |
KVM: remove unneeded return value of vcpu_postcreate
The return value of kvm_arch_vcpu_postcreate is not checked in its
caller. This is okay, because only x86 provides vcpu_postcreate right
now and it could only fail if vcpu_load failed. But that is not
possible during KVM_CREATE_VCPU (kvm_arch_vcpu_load is void, too), so
just get rid of the unchecked return value.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
-rw-r--r-- | arch/arm/kvm/arm.c | 3 | ||||
-rw-r--r-- | arch/mips/kvm/mips.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 3 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 3 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 10 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 2 |
6 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 2d6d91001062..1a10e0ce9266 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c | |||
@@ -241,9 +241,8 @@ out: | |||
241 | return ERR_PTR(err); | 241 | return ERR_PTR(err); |
242 | } | 242 | } |
243 | 243 | ||
244 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | 244 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) |
245 | { | 245 | { |
246 | return 0; | ||
247 | } | 246 | } |
248 | 247 | ||
249 | void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) | 248 | void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) |
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index e3b21e51ff7e..7082481cd108 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -832,9 +832,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
832 | return -ENOIOCTLCMD; | 832 | return -ENOIOCTLCMD; |
833 | } | 833 | } |
834 | 834 | ||
835 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | 835 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) |
836 | { | 836 | { |
837 | return 0; | ||
838 | } | 837 | } |
839 | 838 | ||
840 | int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) | 839 | int kvm_arch_vcpu_ioctl_get_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index c45eaab752b0..27c0face86f4 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -623,9 +623,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) | |||
623 | return vcpu; | 623 | return vcpu; |
624 | } | 624 | } |
625 | 625 | ||
626 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | 626 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) |
627 | { | 627 | { |
628 | return 0; | ||
629 | } | 628 | } |
630 | 629 | ||
631 | void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) | 630 | void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 3e09801e3104..ec004f80ee45 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -615,9 +615,8 @@ static void kvm_s390_vcpu_initial_reset(struct kvm_vcpu *vcpu) | |||
615 | kvm_s390_clear_local_irqs(vcpu); | 615 | kvm_s390_clear_local_irqs(vcpu); |
616 | } | 616 | } |
617 | 617 | ||
618 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | 618 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) |
619 | { | 619 | { |
620 | return 0; | ||
621 | } | 620 | } |
622 | 621 | ||
623 | static void kvm_s390_vcpu_crypto_setup(struct kvm_vcpu *vcpu) | 622 | static void kvm_s390_vcpu_crypto_setup(struct kvm_vcpu *vcpu) |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 49ecda7ca958..274fbcbcc180 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -7056,15 +7056,13 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | |||
7056 | return r; | 7056 | return r; |
7057 | } | 7057 | } |
7058 | 7058 | ||
7059 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | 7059 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) |
7060 | { | 7060 | { |
7061 | int r; | ||
7062 | struct msr_data msr; | 7061 | struct msr_data msr; |
7063 | struct kvm *kvm = vcpu->kvm; | 7062 | struct kvm *kvm = vcpu->kvm; |
7064 | 7063 | ||
7065 | r = vcpu_load(vcpu); | 7064 | if (vcpu_load(vcpu)) |
7066 | if (r) | 7065 | return; |
7067 | return r; | ||
7068 | msr.data = 0x0; | 7066 | msr.data = 0x0; |
7069 | msr.index = MSR_IA32_TSC; | 7067 | msr.index = MSR_IA32_TSC; |
7070 | msr.host_initiated = true; | 7068 | msr.host_initiated = true; |
@@ -7073,8 +7071,6 @@ int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) | |||
7073 | 7071 | ||
7074 | schedule_delayed_work(&kvm->arch.kvmclock_sync_work, | 7072 | schedule_delayed_work(&kvm->arch.kvmclock_sync_work, |
7075 | KVMCLOCK_SYNC_PERIOD); | 7073 | KVMCLOCK_SYNC_PERIOD); |
7076 | |||
7077 | return r; | ||
7078 | } | 7074 | } |
7079 | 7075 | ||
7080 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) | 7076 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 26f106022c88..a82432c710c9 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -652,7 +652,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu); | |||
652 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu); | 652 | void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu); |
653 | struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id); | 653 | struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id); |
654 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); | 654 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); |
655 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); | 655 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); |
656 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); | 656 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); |
657 | 657 | ||
658 | int kvm_arch_hardware_enable(void); | 658 | int kvm_arch_hardware_enable(void); |