Skip to contentSkip to conversation

x86/kvm: fix a missing-prototypes "vmread_error"

PATCH Applied Qian Cai 2 participants 2 messages Apr 2, 2020

Subsystems (3)
lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH 1/1 x86/kvm: fix a missing-prototypes "vmread_error"

The commit 842f4be95899 ("KVM: VMX: Add a trampoline to fix VMREAD error handling") removed the declaration of vmread_error() causes a W=1 build failure with KVM_WERROR=y. Fix it by adding it back.

arch/x86/kvm/vmx/vmx.c:359:17: error: no previous prototype for 'vmread_error' [-Werror=missing-prototypes]
asmlinkage void vmread_error(unsigned long field, bool fault)

                 ^~~~~~~~~~~~
---
 arch/x86/kvm/vmx/ops.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kvm/vmx/ops.h +1 -0
index 09b0937d56b1..19717d0a1100 100644
@@ -12,6 +12,7 @@
 
 #define __ex(x) __kvm_handle_fault_on_reboot(x)
 
+asmlinkage void vmread_error(unsigned long field, bool fault);
 __attribute__((regparm(0))) void vmread_error_trampoline(unsigned long field,
 							 bool fault);
 void vmwrite_error(unsigned long field, unsigned long value);
Signature · 1 line
2.21.0 (Apple Git-122.2)
maintainer Applied
#1 lore raw
Quoted 19 lines · Qian Cai

The commit 842f4be95899 ("KVM: VMX: Add a trampoline to fix VMREAD error handling") removed the declaration of vmread_error() causes a W=1 build failure with KVM_WERROR=y. Fix it by adding it back.

arch/x86/kvm/vmx/vmx.c:359:17: error: no previous prototype for 'vmread_error' [-Werror=missing-prototypes]
asmlinkage void vmread_error(unsigned long field, bool fault)

                 ^~~~~~~~~~~~
---
 arch/x86/kvm/vmx/ops.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kvm/vmx/ops.h +0 -0
index 09b0937d56b1..19717d0a1100 100644

arch/x86/kvm/vmx/ops.h line 18

Quoted 7 lines
arch/x86/kvm/vmx/ops.h +1 -0
@@ -12,6 +12,7 @@
 
 #define __ex(x) __kvm_handle_fault_on_reboot(x)
 
+asmlinkage void vmread_error(unsigned long field, bool fault);
 __attribute__((regparm(0))) void vmread_error_trampoline(unsigned long field,
 							 bool fault);
 void vmwrite_error(unsigned long field, unsigned long value);

Merged, thanks.

Paolo