]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: mark sandbox_exit() as no return.
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 1 Apr 2023 07:54:25 +0000 (09:54 +0200)
committerSimon Glass <sjg@chromium.org>
Fri, 28 Apr 2023 17:30:17 +0000 (11:30 -0600)
Fix a -Wimplicit-fallthrough warning in sandbox_sysreset_request().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/cpu.c
arch/sandbox/include/asm/u-boot-sandbox.h
drivers/sysreset/sysreset_sandbox.c

index 248d17a85c828a7a0a0aa2b95633a7e878ac21c8..51496338ad6093f9b144163f00b0303c39ccacc7 100644 (file)
@@ -31,7 +31,7 @@ static struct udevice *map_dev;
 unsigned long map_len;
 #endif
 
-void sandbox_exit(void)
+void __noreturn sandbox_exit(void)
 {
        /* Do this here while it still has an effect */
        os_fd_restore();
index 9eb19323ecf2db84c7cd684c9e73b1c4d943de28..e7027747b379fc675f83bbf3fcf81b5c4def5cd4 100644 (file)
@@ -87,6 +87,6 @@ void sandbox_set_enable_pci_map(int enable);
 void sandbox_reset(void);
 
 /* Exit sandbox (quit U-Boot) */
-void sandbox_exit(void);
+void __noreturn sandbox_exit(void);
 
 #endif /* _U_BOOT_SANDBOX_H_ */
index 0ee286cbb34f1f44f6b2565227e80ce4d85164c5..3750c60b9b99492ffbaa0f66c97826154fc210de 100644 (file)
@@ -65,7 +65,6 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type)
                if (!state->sysreset_allowed[type])
                        return -EACCES;
                sandbox_exit();
-               break;
        case SYSRESET_POWER:
                if (!state->sysreset_allowed[type])
                        return -EACCES;