objtool: Rework allocating stack_ops on decode
authorPeter Zijlstra <peterz@infradead.org>
Thu, 23 Apr 2020 11:22:10 +0000 (13:22 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 30 Apr 2020 18:14:32 +0000 (20:14 +0200)
commit7d989fcadd6e225a61d6490dd15bdbdfc8a53d5c
tree583bf629f9258bcb0db970768f6a6c697e17ff66
parentc721b3f80faebc7891211fa82de303eebadfed15
objtool: Rework allocating stack_ops on decode

Wrap each stack_op in a macro that allocates and adds it to the list.
This simplifies trying to figure out what to do with the pre-allocated
stack_op at the end.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20200428191659.736151601@infradead.org
tools/objtool/arch/x86/decode.c