Skip to content

Commit 5c12af0

Browse files
daveyoungMatt Fleming
authored andcommitted
x86/efi: parse_efi_setup() build fix
In case without CONFIG_EFI, there will be below build error: arch/x86/built-in.o: In function `setup_arch': (.init.text+0x9dc): undefined reference to `parse_efi_setup' Thus fix it by adding blank inline function in asm/efi.h Also remove an unused declaration for variable efi_data_len. Signed-off-by: Dave Young <dyoung@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
1 parent 41a34ce commit 5c12af0

File tree

1 file changed

+2
-3
lines changed
  • arch/x86/include/asm

1 file changed

+2
-3
lines changed

arch/x86/include/asm/efi.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ struct efi_setup_data {
142142
};
143143

144144
extern u64 efi_setup;
145-
extern u32 efi_data_len;
146-
extern void parse_efi_setup(u64 phys_addr, u32 data_len);
147145

148146
#ifdef CONFIG_EFI
149147

@@ -153,7 +151,7 @@ static inline bool efi_is_native(void)
153151
}
154152

155153
extern struct console early_efi_console;
156-
154+
extern void parse_efi_setup(u64 phys_addr, u32 data_len);
157155
#else
158156
/*
159157
* IF EFI is not configured, have the EFI calls return -ENOSYS.
@@ -165,6 +163,7 @@ extern struct console early_efi_console;
165163
#define efi_call4(_f, _a1, _a2, _a3, _a4) (-ENOSYS)
166164
#define efi_call5(_f, _a1, _a2, _a3, _a4, _a5) (-ENOSYS)
167165
#define efi_call6(_f, _a1, _a2, _a3, _a4, _a5, _a6) (-ENOSYS)
166+
static inline void parse_efi_setup(u64 phys_addr, u32 data_len) {}
168167
#endif /* CONFIG_EFI */
169168

170169
#endif /* _ASM_X86_EFI_H */

0 commit comments

Comments
 (0)