Commit 6dfc1c1f authored by Richard Weinberger's avatar Richard Weinberger Committed by Kleber Sacilotto de Souza

um: Give start_idle_thread() a return code

BugLink: https://bugs.launchpad.net/bugs/1810958

[ Upstream commit 7ff1e34b ]

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: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 81b7fc98
...@@ -585,6 +585,11 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf) ...@@ -585,6 +585,11 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf)
fatal_sigsegv(); fatal_sigsegv();
} }
longjmp(*switch_buf, 1); 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) void initial_thread_cb_skas(void (*proc)(void *), void *arg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment