From: Josh Poimboeuf Date: Wed, 12 Apr 2023 19:03:22 +0000 (-0700) Subject: objtool: Remove superfluous dead_end_function() check X-Git-Tag: v6.4-rc1~96^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6126ed5dfbc656374e851bfdfb128f3aa9e1263a;p=thirdparty%2Fkernel%2Flinux.git objtool: Remove superfluous dead_end_function() check annotate_call_site() already sets 'insn->dead_end' for calls to dead end functions. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/5d603a301e9a8b1036b61503385907e154867ace.1681325924.git.jpoimboe@kernel.org --- diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 9de3972a9b1c4..1cf2e2841c474 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -4078,8 +4078,7 @@ static bool ignore_unreachable_insn(struct objtool_file *file, struct instructio * It may also insert a UD2 after calling a __noreturn function. */ prev_insn = prev_insn_same_sec(file, insn); - if ((prev_insn->dead_end || - dead_end_function(file, insn_call_dest(prev_insn))) && + if (prev_insn->dead_end && (insn->type == INSN_BUG || (insn->type == INSN_JUMP_UNCONDITIONAL && insn->jump_dest && insn->jump_dest->type == INSN_BUG)))