[PATCH 1/1] sandbox: mark sandbox_exit() as no return.
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Sat Apr 1 09:54:25 CEST 2023
Fix a -Wimplicit-fallthrough warning in sandbox_sysreset_request().
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
arch/sandbox/cpu/cpu.c | 2 +-
arch/sandbox/include/asm/u-boot-sandbox.h | 2 +-
drivers/sysreset/sysreset_sandbox.c | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 636d3545b9..1ed34d3350 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -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();
diff --git a/arch/sandbox/include/asm/u-boot-sandbox.h b/arch/sandbox/include/asm/u-boot-sandbox.h
index 9eb19323ec..e7027747b3 100644
--- a/arch/sandbox/include/asm/u-boot-sandbox.h
+++ b/arch/sandbox/include/asm/u-boot-sandbox.h
@@ -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_ */
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index 0ee286cbb3..3750c60b9b 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -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;
--
2.39.2
More information about the U-Boot
mailing list