efi: Move efifb_setup_from_dmi() prototype from arch headers
Subsystems (6)
PATCH 1/1 efi: Move efifb_setup_from_dmi() prototype from arch headers
Commit 8633ef82f101 ("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 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)
---
arch/arm/include/asm/efi.h | 1 - arch/arm64/include/asm/efi.h | 1 - arch/riscv/include/asm/efi.h | 1 - arch/x86/include/asm/efi.h | 2 -- include/linux/efi.h | 6 ++++++ 5 files changed, 6 insertions(+), 5 deletions(-)
arch/arm/include/asm/efi.h +0 -1
@@ -17,7 +17,6 @@#ifdef CONFIG_EFI void efi_init (void ); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt);int efi_create_mapping (struct mm_struct *mm,efi_memory_desc_t *md);int efi_set_mapping_permissions (struct mm_struct *mm,efi_memory_desc_t *md);
arch/arm64/include/asm/efi.h +0 -1
@@ -14,7 +14,6 @@#ifdef CONFIG_EFI extern void efi_init (void ); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt);#else #define efi_init ()#endif
arch/riscv/include/asm/efi.h +0 -1
@@ -13,7 +13,6 @@#ifdef CONFIG_EFI extern void efi_init (void ); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt);#else #define efi_init ()#endif
arch/x86/include/asm/efi.h +0 -2
@@ -197,8 +197,6 @@ static inline bool efi_runtime_supported(void)extern void parse_efi_setup (u64 phys_addr,u32 data_len); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt); -extern void efi_thunk_runtime_setup (void ); efi_status_t efi_set_virtual_address_map(unsigned long memory_map_size, unsigned long descriptor_size,
include/linux/efi.h +6 -0
@@ -1283,4 +1283,10 @@ static inline struct efi_mokvar_table_entry *efi_mokvar_entry_find( }#endif +#ifdef CONFIG_SYSFB +extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt); +#else +static inline void efifb_setup_from_dmi (struct screen_info *si,const char *opt) { } +#endif +#endif /* _LINUX_EFI_H */
Signature · 1 line
2.33.1
Hi
Am 26.11.21 um 01:13 schrieb Javier Martinez Canillas:
Quoted 14 lines
Commit
8633ef82f101("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 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] voidefifb_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 voidefifb_setup_from_dmi(struct screen_info *si, const char *opt)
Quoted 4 lines
Fixes 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup for all arches")Reported-by kernel test robot <[email protected]>Cc <[email protected]> # 5.15.xSigned-off-by Javier Martinez Canillas <[email protected]>
Quoted 74 lines
---
arch/arm/include/asm/efi.h | 1 - arch/arm64/include/asm/efi.h | 1 - arch/riscv/include/asm/efi.h | 1 - arch/x86/include/asm/efi.h | 2 -- include/linux/efi.h | 6 ++++++ 5 files changed, 6 insertions(+), 5 deletions(-)arch/arm/include/asm/efi.h +0
-1@@ -17,7 +17,6 @@#ifdef CONFIG_EFI void efi_init (void ); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt);int efi_create_mapping (struct mm_struct *mm,efi_memory_desc_t *md);int efi_set_mapping_permissions (struct mm_struct *mm,efi_memory_desc_t *md);arch/arm64/include/asm/efi.h +0
-1@@ -14,7 +14,6 @@#ifdef CONFIG_EFI extern void efi_init (void ); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt);#else #define efi_init ()#endif arch/riscv/include/asm/efi.h +0
-1@@ -13,7 +13,6 @@#ifdef CONFIG_EFI extern void efi_init (void ); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt);#else #define efi_init ()#endif arch/x86/include/asm/efi.h +0
-2@@ -197,8 +197,6 @@ static inline bool efi_runtime_supported(void)extern void parse_efi_setup (u64 phys_addr,u32 data_len); -extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt); -extern void efi_thunk_runtime_setup (void ); efi_status_t efi_set_virtual_address_map(unsigned long memory_map_size, unsigned long descriptor_size,include/linux/efi.h +6
-0@@ -1283,4 +1283,10 @@ static inline struct efi_mokvar_table_entry *efi_mokvar_entry_find( }#endif +#ifdef CONFIG_SYSFB +extern void efifb_setup_from_dmi (struct screen_info *si,const char *opt); +#else +static inline void efifb_setup_from_dmi (struct screen_info *si,const char *opt) { } +#endif +#endif /* _LINUX_EFI_H */
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev