Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
efi: fix -Wmissing-variable-declarations warning
When building x86/defconfig with Clang-18 I encounter the following warnings: | arch/x86/platform/efi/efi.c:934:23: warning: no previous extern declaration for non-static variable 'efi_attr_fw_vendor' [-Wmissing-variable-declarations] | 934 | struct kobj_attribute efi_attr_fw_vendor = __ATTR_RO(fw_vendor); | arch/x86/platform/efi/efi.c:935:23: warning: no previous extern declaration for non-static variable 'efi_attr_runtime' [-Wmissing-variable-declarations] | 935 | struct kobj_attribute efi_attr_runtime = __ATTR_RO(runtime); | arch/x86/platform/efi/efi.c:936:23: warning: no previous extern declaration for non-static variable 'efi_attr_config_table' [-Wmissing-variable-declarations] | 936 | struct kobj_attribute efi_attr_config_table = __ATTR_RO(config_table); These symbols are declared extern in drivers/firmware/efi/efi.c. Move the declarations to linux/efi.h to resolve these warnings. Also, trim a trailing space from efi_set_variable_t typedef. Link: ClangBuiltLinux#1920 Suggested-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Justin Stitt <justinstitt@google.com>
- Loading branch information