Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID0RFA -------------------------------- 40c9b7d235ac ("[Backport] start_kernel: Add __no_stack_protector function attribute") add __noreturn function attribute to start_kernel and lead build warning: build warning: x86_64, allmodconfig init/main.c: In function ‘start_kernel’: init/main.c:1150:1: warning: ‘noreturn’ function does return } fix this by add unreachable() in the end of start_kernel(). Fixes: 40c9b7d235ac ("[Backport] start_kernel: Add __no_stack_protector function attribute") Signed-off-by: Lin Yujun <linyujun809@h-partners.com> --- init/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/init/main.c b/init/main.c index 5d73bd096bd0..86b31c0f4856 100644 --- a/init/main.c +++ b/init/main.c @@ -1075,10 +1075,11 @@ void start_kernel(void) /* Do the rest non-__init'ed, we're now alive */ arch_call_rest_init(); prevent_tail_call_optimization(); + unreachable(); } /* Call all constructor functions linked into the kernel. */ static void __init do_ctors(void) { -- 2.34.1