Skip to content

Commit 4bc5e64

Browse files
martinezjavierardbiesheuvel
authored andcommitted
efi: Move efifb_setup_from_dmi() prototype from arch headers
Commit 8633ef8 ("drivers/firmware: consolidate EFI framebuffer setup for all arches") made the Generic System Framebuffers (sysfb) driver able to be built on non-x86 architectures. But it left the efifb_setup_from_dmi() function prototype declaration in the architecture specific headers. This could lead to the following compiler warning as reported by the kernel test robot: drivers/firmware/efi/sysfb_efi.c:70:6: warning: no previous prototype for function 'efifb_setup_from_dmi' [-Wmissing-prototypes] void efifb_setup_from_dmi(struct screen_info *si, const char *opt) ^ drivers/firmware/efi/sysfb_efi.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void efifb_setup_from_dmi(struct screen_info *si, const char *opt) Fixes: 8633ef8 ("drivers/firmware: consolidate EFI framebuffer setup for all arches") Reported-by: kernel test robot <[email protected]> Cc: <[email protected]> # 5.15.x Signed-off-by: Javier Martinez Canillas <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 1ff2fc0 commit 4bc5e64

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

arch/arm/include/asm/efi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#ifdef CONFIG_EFI
1919
void efi_init(void);
20-
extern void efifb_setup_from_dmi(struct screen_info *si, const char *opt);
2120

2221
int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md);
2322
int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);

arch/arm64/include/asm/efi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#ifdef CONFIG_EFI
1616
extern void efi_init(void);
17-
extern void efifb_setup_from_dmi(struct screen_info *si, const char *opt);
1817
#else
1918
#define efi_init()
2019
#endif

arch/riscv/include/asm/efi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#ifdef CONFIG_EFI
1515
extern void efi_init(void);
16-
extern void efifb_setup_from_dmi(struct screen_info *si, const char *opt);
1716
#else
1817
#define efi_init()
1918
#endif

arch/x86/include/asm/efi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ static inline bool efi_runtime_supported(void)
197197

198198
extern void parse_efi_setup(u64 phys_addr, u32 data_len);
199199

200-
extern void efifb_setup_from_dmi(struct screen_info *si, const char *opt);
201-
202200
extern void efi_thunk_runtime_setup(void);
203201
efi_status_t efi_set_virtual_address_map(unsigned long memory_map_size,
204202
unsigned long descriptor_size,

include/linux/efi.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,4 +1283,10 @@ static inline struct efi_mokvar_table_entry *efi_mokvar_entry_find(
12831283
}
12841284
#endif
12851285

1286+
#ifdef CONFIG_SYSFB
1287+
extern void efifb_setup_from_dmi(struct screen_info *si, const char *opt);
1288+
#else
1289+
static inline void efifb_setup_from_dmi(struct screen_info *si, const char *opt) { }
1290+
#endif
1291+
12861292
#endif /* _LINUX_EFI_H */

0 commit comments

Comments
 (0)