aboutsummaryrefslogtreecommitdiffstats
path: root/tools/objtool/check.h
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2019-07-17 20:36:56 -0500
committerThomas Gleixner <tglx@linutronix.de>2019-07-18 21:01:10 +0200
commit9fe7b7642fe2c5158904d06fe31b740ca0695a01 (patch)
tree6488c994de6e16016bc5ded0beaf5ace832d0837 /tools/objtool/check.h
parentobjtool: Fix seg fault on bad switch table entry (diff)
downloadlinux-dev-9fe7b7642fe2c5158904d06fe31b740ca0695a01.tar.xz
linux-dev-9fe7b7642fe2c5158904d06fe31b740ca0695a01.zip
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.h')
-rw-r--r--tools/objtool/check.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/check.h b/tools/objtool/check.h
index afa6a79e0715..b881fafcf55d 100644
--- a/tools/objtool/check.h
+++ b/tools/objtool/check.h
@@ -31,7 +31,7 @@ struct instruction {
struct section *sec;
unsigned long offset;
unsigned int len;
- unsigned char type;
+ enum insn_type type;
unsigned long immediate;
bool alt_group, visited, dead_end, ignore, hint, save, restore, ignore_alts;
bool retpoline_safe;