There is no need for this function as all arches have to implement kvm_arch_create_vcpu_debugfs() no matter what. A #define symbol let us actually simplify the code.
Showing the changes to include/linux (1 of 8 files). Show all
Unified · Split
| @@ -861,8 +861,9 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); · 860 unmodified lines | ||
| 861 | 861 | void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); |
| 862 | 862 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); |
| 863 | 863 | |
| 864 | −bool kvm_arch_has_vcpu_debugfs(void); | |
| 864 | +#ifdef __KVM_HAVE_ARCH_VCPU_DEBUGFS | |
| 865 | 865 | int kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu); |
| 866 | +#endif | |
| 866 | 867 | |
| 867 | 868 | int kvm_arch_hardware_enable(void); |
| 868 | 869 | void kvm_arch_hardware_disable(void); |