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 248d17a..5149633 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 9eb1932..e702774 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 0ee286c..3750c60 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;