diff options
author | Richard Weinberger <richard@nod.at> | 2018-06-15 17:42:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 18:08:00 +0300 |
commit | 6d4c882c4ca1a6457630f62dfe5700365eddc70c (patch) | |
tree | 23fac1b6e18205c86fc127ea820d8c98d6eeb0c2 /arch/um | |
parent | 5f427ca479c33907abceb3e767cf1a76a5f5bffd (diff) | |
download | linux-6d4c882c4ca1a6457630f62dfe5700365eddc70c.tar.xz |
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>
Diffstat (limited to 'arch/um')
-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 b856c66ebd3a..6dbf27ffafc8 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c @@ -585,6 +585,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) |