]> err.no Git - linux-2.6/commitdiff
x86: constify stacktrace_ops
authorJan Beulich <jbeulich@novell.com>
Wed, 17 Oct 2007 16:04:37 +0000 (18:04 +0200)
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>
Wed, 17 Oct 2007 18:16:11 +0000 (20:16 +0200)
.. as they're never written to.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/stacktrace.c
arch/x86/kernel/traps_32.c
arch/x86/kernel/traps_64.c
include/asm-x86/stacktrace.h

index 413e527cdeb97394bbccb245d182338b463fcde4..6fa6cf036c7065bf1ead1ba9f668f07bbab834cd 100644 (file)
@@ -33,7 +33,7 @@ static void save_stack_address(void *data, unsigned long addr)
                trace->entries[trace->nr_entries++] = addr;
 }
 
-static struct stacktrace_ops save_stack_ops = {
+static const struct stacktrace_ops save_stack_ops = {
        .warning = save_stack_warning,
        .warning_symbol = save_stack_warning_symbol,
        .stack = save_stack_stack,
index 0fce34226b7d09cc1ce6b512fcbc55fb7156413d..83a9bbbbe38f6007525c9245f5e98fec86d36c70 100644 (file)
@@ -112,7 +112,7 @@ struct stack_frame {
 
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
                                unsigned long *stack, unsigned long ebp,
-                               struct stacktrace_ops *ops, void *data)
+                               const struct stacktrace_ops *ops, void *data)
 {
 #ifdef CONFIG_FRAME_POINTER
        struct stack_frame *frame = (struct stack_frame *)ebp;
@@ -149,7 +149,7 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
 
 void dump_trace(struct task_struct *task, struct pt_regs *regs,
                unsigned long *stack,
-               struct stacktrace_ops *ops, void *data)
+               const struct stacktrace_ops *ops, void *data)
 {
        unsigned long ebp = 0;
 
@@ -221,7 +221,7 @@ static void print_trace_address(void *data, unsigned long addr)
        touch_nmi_watchdog();
 }
 
-static struct stacktrace_ops print_trace_ops = {
+static const struct stacktrace_ops print_trace_ops = {
        .warning = print_trace_warning,
        .warning_symbol = print_trace_warning_symbol,
        .stack = print_trace_stack,
index bc7116acf8fff425ca30fad69d339f550e79411b..b4a9b3db19941ee62359798d05e5964bd954de91 100644 (file)
@@ -215,7 +215,7 @@ static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
 
 void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
                unsigned long *stack,
-               struct stacktrace_ops *ops, void *data)
+               const struct stacktrace_ops *ops, void *data)
 {
        const unsigned cpu = get_cpu();
        unsigned long *irqstack_end = (unsigned long*)cpu_pda(cpu)->irqstackptr;
@@ -336,7 +336,7 @@ static void print_trace_address(void *data, unsigned long addr)
        printk_address(addr);
 }
 
-static struct stacktrace_ops print_trace_ops = {
+static const struct stacktrace_ops print_trace_ops = {
        .warning = print_trace_warning,
        .warning_symbol = print_trace_warning_symbol,
        .stack = print_trace_stack,
index 6f0b5459430739c0d60b936a28233e6841b23aa5..70dd5bae32350fbd0c1d90cabdbeda9cf0740818 100644 (file)
@@ -15,6 +15,6 @@ struct stacktrace_ops {
 };
 
 void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long *stack,
-               struct stacktrace_ops *ops, void *data);
+               const struct stacktrace_ops *ops, void *data);
 
 #endif