diff options
author | Richard Weinberger <richard@nod.at> | 2018-06-15 16:42:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 16:10:46 +0100 |
commit | a134b05a43ae2327036e860fb10c74389b5bd971 (patch) | |
tree | 199d5b4c5e698f1a9be3dd5adf79d1b3c4d6e236 | |
parent | f2e71fed903fa6441188f4ac8b0df6528711cae3 (diff) |
um: Give start_idle_thread() a return code
[ Upstream commit 7ff1e34bbdc15acab823b1ee4240e94623d50ee8 ]
Fixes:
arch/um/os-Linux/skas/process.c:613:1: warning: control reaches end of
non-void function [-Wreturn-type]
longjmp() never returns but gcc still warns that the end of the function
can be reached.
Add a return code and debug aid to detect this impossible case.
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | arch/um/os-Linux/skas/process.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index c94c3bd70ccd..df4a985716eb 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -610,6 +610,11 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf) fatal_sigsegv(); } longjmp(*switch_buf, 1); + + /* unreachable */ + printk(UM_KERN_ERR "impossible long jump!"); + fatal_sigsegv(); + return 0; } void initial_thread_cb_skas(void (*proc)(void *), void *arg) |