diff mbox series

efi: Fix missing `efi_handover_entry` prototype

Message ID 20241212161517.443855-1-zhouding@cmss.chinamobile.com
State New
Headers show
Series efi: Fix missing `efi_handover_entry` prototype | expand

Commit Message

Zhou Ding Dec. 12, 2024, 4:15 p.m. UTC
We get 1 error when building kernel withW=1:
drivers/firmware/efi/libstub/x86-stub.c:1068:6: error: no previous prototype for ‘efi_handover_entry’ [-Werror=missing-prototypes]
 1068 | void efi_handover_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg,
      |      ^~~~~~~~~~~~~~~~~~

As this function is only used in the file, mark it as 'static'.

Signed-off-by: Zhou Ding <zhouding@cmss.chinamobile.com>
---
 drivers/firmware/efi/libstub/x86-stub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

kernel test robot Dec. 20, 2024, 2:38 p.m. UTC | #1
Hi Zhou,

kernel test robot noticed the following build errors:

[auto build test ERROR on efi/next]
[also build test ERROR on linus/master v6.13-rc3 next-20241220]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Zhou-Ding/efi-Fix-missing-efi_handover_entry-prototype/20241213-175109
base:   https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
patch link:    https://lore.kernel.org/r/20241212161517.443855-1-zhouding%40cmss.chinamobile.com
patch subject: [PATCH] efi: Fix missing `efi_handover_entry` prototype
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20241220/202412202207.3eUih2hS-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241220/202412202207.3eUih2hS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412202207.3eUih2hS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> ld: Unexpected GOT/PLT entries detected!
>> ld: Unexpected run-time procedure linkages detected!
>> ld: Unexpected run-time relocations (.rela) detected!
   ld: arch/x86/boot/compressed/efi_mixed.o: in function `efi64_stub_entry':
>> (.text+0x2d1): undefined reference to `efi_handover_entry'
kernel test robot Dec. 21, 2024, 11:28 p.m. UTC | #2
Hi Zhou,

kernel test robot noticed the following build errors:

[auto build test ERROR on efi/next]
[also build test ERROR on linus/master v6.13-rc3 next-20241220]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Zhou-Ding/efi-Fix-missing-efi_handover_entry-prototype/20241213-175109
base:   https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git next
patch link:    https://lore.kernel.org/r/20241212161517.443855-1-zhouding%40cmss.chinamobile.com
patch subject: [PATCH] efi: Fix missing `efi_handover_entry` prototype
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241222/202412220717.yUDPy17I-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241222/202412220717.yUDPy17I-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412220717.yUDPy17I-lkp@intel.com/

All errors (new ones prefixed by >>):

>> ld.lld: error: undefined symbol: efi_handover_entry
   >>> referenced by arch/x86/boot/compressed/efi_mixed.o:(efi64_stub_entry)
diff mbox series

Patch

diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index 188c8000d245..4d152b0df59d 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -1065,7 +1065,7 @@  void __noreturn efi_stub_entry(efi_handle_t handle,
 }
 
 #ifdef CONFIG_EFI_HANDOVER_PROTOCOL
-void efi_handover_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg,
+static void  efi_handover_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg,
 			struct boot_params *boot_params)
 {
 	memset(_bss, 0, _ebss - _bss);