[PATCH] x86/efistub: resolve compilation errors

shiqiang.deng posted 1 patch 2 years, 1 month ago
drivers/firmware/efi/libstub/x86-stub.h | 5 +++++
1 file changed, 5 insertions(+)
[PATCH] x86/efistub: resolve compilation errors
Posted by shiqiang.deng 2 years, 1 month ago
I found that under the conditions of
CONFIG_EFI_HANDOVER_PROTOCOL=y and CONFIG_EFI_MIXED=y,
there is a missing-prototypes error for the efi_handover_entry() function.
Let's now fix it.

Signed-off-by: shiqiang.deng <shiqiang.deng213@gmail.com>
---
 drivers/firmware/efi/libstub/x86-stub.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/firmware/efi/libstub/x86-stub.h b/drivers/firmware/efi/libstub/x86-stub.h
index 37c5a36b9d8c..aa020f88ce68 100644
--- a/drivers/firmware/efi/libstub/x86-stub.h
+++ b/drivers/firmware/efi/libstub/x86-stub.h
@@ -8,6 +8,11 @@ extern const u16 trampoline_ljmp_imm_offset;
 void efi_adjust_memory_range_protection(unsigned long start,
 					unsigned long size);
 
+#ifdef CONFIG_EFI_HANDOVER_PROTOCOL
+void efi_handover_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg,
+					struct boot_params *boot_params);
+#endif
+
 #ifdef CONFIG_X86_64
 efi_status_t efi_setup_5level_paging(void);
 void efi_5level_switch(void);
-- 
2.30.0