Skip to content

Commit

Permalink
efi: Move efifb_setup_from_dmi() prototype from arch headers
Browse files Browse the repository at this point in the history
commit 4bc5e64 upstream.

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 <lkp@intel.com>
Cc: <stable@vger.kernel.org> # 5.15.x
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20211126001333.555514-1-javierm@redhat.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
martinezjavier authored and gregkh committed Jan 5, 2022
1 parent 5677e07 commit f5cb610
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion arch/arm/include/asm/efi.h
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/include/asm/efi.h
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion arch/riscv/include/asm/efi.h
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/include/asm/efi.h
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions include/linux/efi.h
Expand Up @@ -1282,4 +1282,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 */

0 comments on commit f5cb610

Please sign in to comment.