kvm: vmx: fix some -Wmissing-prototypes warnings
authorYi Wang <wang.yi59@zte.com.cn>
Mon, 21 Jan 2019 07:27:05 +0000 (15:27 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Jan 2019 18:11:35 +0000 (19:11 +0100)
We get some warnings when building kernel with W=1:
arch/x86/kvm/vmx/vmx.c:426:5: warning: no previous prototype for ‘kvm_fill_hv_flush_list_func’ [-Wmissing-prototypes]
arch/x86/kvm/vmx/nested.c:58:6: warning: no previous prototype for ‘init_vmcs_shadow_fields’ [-Wmissing-prototypes]

Make them static to fix this.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c

index ce81539238547bb7e1d9f40d9ff4d198c2343f2c..8ff20523661b87c5e68ee263cef47debb53f1d1f 100644 (file)
@@ -55,7 +55,7 @@ static u16 shadow_read_write_fields[] = {
 static int max_shadow_read_write_fields =
        ARRAY_SIZE(shadow_read_write_fields);
 
-void init_vmcs_shadow_fields(void)
+static void init_vmcs_shadow_fields(void)
 {
        int i, j;
 
index 0762fcab8fc9d4886d93b5f4a67be869cd5d6304..8be2abbdf63f7e8a7b2215de3d38337face1de38 100644 (file)
@@ -423,7 +423,7 @@ static void check_ept_pointer_match(struct kvm *kvm)
        to_kvm_vmx(kvm)->ept_pointers_match = EPT_POINTERS_MATCH;
 }
 
-int kvm_fill_hv_flush_list_func(struct hv_guest_mapping_flush_list *flush,
+static int kvm_fill_hv_flush_list_func(struct hv_guest_mapping_flush_list *flush,
                void *data)
 {
        struct kvm_tlb_range *range = data;