summaryrefslogtreecommitdiffstats
path: root/include/linux/stacktrace.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-07-22 11:24:41 -0700
committerIngo Molnar <mingo@kernel.org>2019-07-25 15:43:26 +0200
commita2970421640bd9b6a78f2685d7750a791abdfd4e (patch)
treef0c7d294f17f03a2c8df0a8a26f8ef1ca01c8241 /include/linux/stacktrace.h
parent364f6afc4f5537b79cf454eb35cae92920676075 (diff)
downloadlinux-a2970421640bd9b6a78f2685d7750a791abdfd4e.tar.gz
linux-a2970421640bd9b6a78f2685d7750a791abdfd4e.tar.bz2
linux-a2970421640bd9b6a78f2685d7750a791abdfd4e.zip
stacktrace: Constify 'entries' arguments
Make it clear to humans and to the compiler that the stack trace ('entries') arguments are not modified. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Waiman Long <longman@redhat.com> Cc: Will Deacon <will.deacon@arm.com> Link: https://lkml.kernel.org/r/20190722182443.216015-3-bvanassche@acm.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/stacktrace.h')
-rw-r--r--include/linux/stacktrace.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h
index f0cfd12cb45e..83bd8cb475d7 100644
--- a/include/linux/stacktrace.h
+++ b/include/linux/stacktrace.h
@@ -9,9 +9,9 @@ struct task_struct;
struct pt_regs;
#ifdef CONFIG_STACKTRACE
-void stack_trace_print(unsigned long *trace, unsigned int nr_entries,
+void stack_trace_print(const unsigned long *trace, unsigned int nr_entries,
int spaces);
-int stack_trace_snprint(char *buf, size_t size, unsigned long *entries,
+int stack_trace_snprint(char *buf, size_t size, const unsigned long *entries,
unsigned int nr_entries, int spaces);
unsigned int stack_trace_save(unsigned long *store, unsigned int size,
unsigned int skipnr);