]> xenbits.xensource.com Git - xen.git/commitdiff
xen/efi: Drop infinite loops and use unreachable()/noreturn
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 2 Jan 2020 13:52:23 +0000 (13:52 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 3 Jan 2020 18:37:24 +0000 (18:37 +0000)
No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wl@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien@xen.org>
xen/arch/arm/efi/efi-boot.h
xen/arch/x86/efi/efi-boot.h
xen/common/efi/boot.c

index ca655ff003c99f48ef50fc67eb486b7566a95a27..d7bf934077ea9bd69b1fd90c48f88cef238acd05 100644 (file)
@@ -367,7 +367,7 @@ static void __init efi_arch_pre_exit_boot(void)
 {
 }
 
-static void __init efi_arch_post_exit_boot(void)
+static void __init noreturn efi_arch_post_exit_boot(void)
 {
     efi_xen_start(fdt, fdt_totalsize(fdt));
 }
index 232972eedf8e9e384b9a86d3ba5742b454f4c660..676d616ff8573d526dbf59c4373b3d8f7a9c1819 100644 (file)
@@ -268,7 +268,7 @@ static void __init noreturn efi_arch_post_exit_boot(void)
                      [stkoff] "i" (STACK_SIZE - sizeof(struct cpu_info)),
                      "D" (&mbi)
                    : "memory" );
-    for( ; ; ); /* not reached */
+    unreachable();
 }
 
 static void __init efi_arch_cfg_file_early(EFI_FILE_HANDLE dir_handle, char *section)
index 3f1c330afec2c675636b73b00ee89c1734230d47..bf7bb95999818e7acc68a1876605883847441f55 100644 (file)
@@ -1401,8 +1401,7 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
 
     efi_exit_boot(ImageHandle, SystemTable);
 
-    efi_arch_post_exit_boot();
-    for( ; ; ); /* not reached */
+    efi_arch_post_exit_boot(); /* Doesn't return. */
 }
 
 #ifndef CONFIG_ARM /* TODO - runtime service support */