diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2019-07-18 04:36:56 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-07-18 22:01:10 +0300 |
commit | 9fe7b7642fe2c5158904d06fe31b740ca0695a01 (patch) | |
tree | 6488c994de6e16016bc5ded0beaf5ace832d0837 /tools/objtool/check.c | |
parent | e65050b94d8c518fdbee572ea4ca6d352e1fda37 (diff) | |
download | linux-9fe7b7642fe2c5158904d06fe31b740ca0695a01.tar.xz |
objtool: Convert insn type to enum
This makes it easier to add new instruction types. Also it's hopefully
more robust since the compiler should warn about out-of-range enums.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/0740e96af0d40e54cfd6a07bf09db0fbd10793cd.1563413318.git.jpoimboe@redhat.com
Diffstat (limited to 'tools/objtool/check.c')
-rw-r--r-- | tools/objtool/check.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index a966b22a32ef..04572a049cfc 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -267,13 +267,6 @@ static int decode_instructions(struct objtool_file *file) if (ret) goto err; - if (!insn->type || insn->type > INSN_LAST) { - WARN_FUNC("invalid instruction type %d", - insn->sec, insn->offset, insn->type); - ret = -1; - goto err; - } - hash_add(file->insn_hash, &insn->hash, insn->offset); list_add_tail(&insn->list, &file->insn_list); } |