summaryrefslogtreecommitdiffstats
path: root/tools/objtool/arch.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-04-22 12:32:05 +0200
committerIngo Molnar <mingo@kernel.org>2020-04-23 08:34:18 +0200
commit0c98be8118221a8d3de572740f29dd02ed9686a5 (patch)
tree91292423dcd2b917c6e1c1a9e277e0bcf6ac834a /tools/objtool/arch.h
parentbc359ff2f6f3e8a9df38c39017e269bc442357c7 (diff)
downloadlinux-0c98be8118221a8d3de572740f29dd02ed9686a5.tar.bz2
objtool: Constify arch_decode_instruction()
Mostly straightforward constification, except that WARN_FUNC() needs a writable pointer while we have read-only pointers, so deflect this to WARN(). Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sami Tolvanen <samitolvanen@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20200422103205.61900-4-mingo@kernel.org
Diffstat (limited to 'tools/objtool/arch.h')
-rw-r--r--tools/objtool/arch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/objtool/arch.h b/tools/objtool/arch.h
index 561c3162d177..445b8fa73ccb 100644
--- a/tools/objtool/arch.h
+++ b/tools/objtool/arch.h
@@ -72,7 +72,7 @@ struct instruction;
void arch_initial_func_cfi_state(struct cfi_init_state *state);
-int arch_decode_instruction(struct elf *elf, struct section *sec,
+int arch_decode_instruction(const struct elf *elf, const struct section *sec,
unsigned long offset, unsigned int maxlen,
unsigned int *len, enum insn_type *type,
unsigned long *immediate,