efi: libstub: Give efi_main() asmlinkage qualification
authorArd Biesheuvel <ardb@kernel.org>
Fri, 14 Oct 2022 17:29:57 +0000 (19:29 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 21 Oct 2022 09:09:40 +0000 (11:09 +0200)
To stop the bots from sending sparse warnings to me and the list about
efi_main() not having a prototype, decorate it with asmlinkage so that
it is clear that it is called from assembly, and therefore needs to
remain external, even if it is never declared in a header file.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/x86-stub.c

index b9ce639..33a7811 100644 (file)
@@ -765,9 +765,9 @@ static efi_status_t exit_boot(struct boot_params *boot_params, void *handle)
  * relocated by efi_relocate_kernel.
  * On failure, we exit to the firmware via efi_exit instead of returning.
  */
-unsigned long efi_main(efi_handle_t handle,
-                            efi_system_table_t *sys_table_arg,
-                            struct boot_params *boot_params)
+asmlinkage unsigned long efi_main(efi_handle_t handle,
+                                 efi_system_table_t *sys_table_arg,
+                                 struct boot_params *boot_params)
 {
        unsigned long bzimage_addr = (unsigned long)startup_32;
        unsigned long buffer_start, buffer_end;