From: Peter Zijlstra <peterz@infradead.org>
Date: Fri, 24 Apr 2020 16:16:41 +0200
Subject: objtool: Make handle_insn_ops() unconditional
Git-commit: 60041bcd8f5ab560dabf44dc384f58bbeb5a6a30
Patch-mainline: v5.8-rc1
References: bsc#1202396
Now that every instruction has a list of stack_ops; we can trivially
distinquish those instructions that do not have stack_ops, their list
is empty.
This means we can now call handle_insn_ops() unconditionally.
Suggested-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20200428191659.795115188@infradead.org
Acked-by: Miroslav Benes <mbenes@suse.cz>
---
tools/objtool/check.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1972,6 +1972,9 @@ static int validate_branch(struct objtoo
return 0;
}
+ if (handle_insn_ops(insn, &state))
+ return 1;
+
switch (insn->type) {
case INSN_RETURN:
@@ -2054,9 +2057,6 @@ static int validate_branch(struct objtoo
return 0;
case INSN_STACK:
- if (handle_insn_ops(insn, &state))
- return 1;
-
break;
default: