diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-07-17 07:36:07 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-07-17 07:36:19 -0400 |
commit | e90a2857c666913258528ce96decc43c749bbf95 (patch) | |
tree | a3aea4cf0973d88ed7790daa3783ad711c35cd37 /arch/s390/kernel/stacktrace.c | |
parent | 810cb5b32ded8f28880b502e984d807d03869d3b (diff) |
[S390] Simplify stack trace.
sparse gives us a few of these:
stacktrace.c:69:38: warning: incorrect type in argument 2
(different signedness)
stacktrace.c:69:38: expected unsigned int *skip
Just get rid of the 'skip' argument since it is contained in the
struct stack_trace that gets passed anyway.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/stacktrace.c')
-rw-r--r-- | arch/s390/kernel/stacktrace.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c index 515ff9011dd7..da6924729964 100644 --- a/arch/s390/kernel/stacktrace.c +++ b/arch/s390/kernel/stacktrace.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kallsyms.h> | 12 | #include <linux/kallsyms.h> |
13 | 13 | ||
14 | static unsigned long save_context_stack(struct stack_trace *trace, | 14 | static unsigned long save_context_stack(struct stack_trace *trace, |
15 | unsigned int *skip, | ||
16 | unsigned long sp, | 15 | unsigned long sp, |
17 | unsigned long low, | 16 | unsigned long low, |
18 | unsigned long high) | 17 | unsigned long high) |
@@ -28,10 +27,10 @@ static unsigned long save_context_stack(struct stack_trace *trace, | |||
28 | sf = (struct stack_frame *)sp; | 27 | sf = (struct stack_frame *)sp; |
29 | while(1) { | 28 | while(1) { |
30 | addr = sf->gprs[8] & PSW_ADDR_INSN; | 29 | addr = sf->gprs[8] & PSW_ADDR_INSN; |
31 | if (!(*skip)) | 30 | if (!trace->skip) |
32 | trace->entries[trace->nr_entries++] = addr; | 31 | trace->entries[trace->nr_entries++] = addr; |
33 | else | 32 | else |
34 | (*skip)--; | 33 | trace->skip--; |
35 | if (trace->nr_entries >= trace->max_entries) | 34 | if (trace->nr_entries >= trace->max_entries) |
36 | return sp; | 35 | return sp; |
37 | low = sp; | 36 | low = sp; |
@@ -48,10 +47,10 @@ static unsigned long save_context_stack(struct stack_trace *trace, | |||
48 | return sp; | 47 | return sp; |
49 | regs = (struct pt_regs *)sp; | 48 | regs = (struct pt_regs *)sp; |
50 | addr = regs->psw.addr & PSW_ADDR_INSN; | 49 | addr = regs->psw.addr & PSW_ADDR_INSN; |
51 | if (!(*skip)) | 50 | if (!trace->skip) |
52 | trace->entries[trace->nr_entries++] = addr; | 51 | trace->entries[trace->nr_entries++] = addr; |
53 | else | 52 | else |
54 | (*skip)--; | 53 | trace->skip--; |
55 | if (trace->nr_entries >= trace->max_entries) | 54 | if (trace->nr_entries >= trace->max_entries) |
56 | return sp; | 55 | return sp; |
57 | low = sp; | 56 | low = sp; |
@@ -65,20 +64,17 @@ void save_stack_trace(struct stack_trace *trace) | |||
65 | unsigned long orig_sp, new_sp; | 64 | unsigned long orig_sp, new_sp; |
66 | 65 | ||
67 | orig_sp = sp & PSW_ADDR_INSN; | 66 | orig_sp = sp & PSW_ADDR_INSN; |
68 | 67 | new_sp = save_context_stack(trace, orig_sp, | |
69 | new_sp = save_context_stack(trace, &trace->skip, orig_sp, | 68 | S390_lowcore.panic_stack - PAGE_SIZE, |
70 | S390_lowcore.panic_stack - PAGE_SIZE, | 69 | S390_lowcore.panic_stack); |
71 | S390_lowcore.panic_stack); | ||
72 | if (new_sp != orig_sp) | 70 | if (new_sp != orig_sp) |
73 | return; | 71 | return; |
74 | new_sp = save_context_stack(trace, &trace->skip, new_sp, | 72 | new_sp = save_context_stack(trace, new_sp, |
75 | S390_lowcore.async_stack - ASYNC_SIZE, | 73 | S390_lowcore.async_stack - ASYNC_SIZE, |
76 | S390_lowcore.async_stack); | 74 | S390_lowcore.async_stack); |
77 | if (new_sp != orig_sp) | 75 | if (new_sp != orig_sp) |
78 | return; | 76 | return; |
79 | 77 | save_context_stack(trace, new_sp, | |
80 | save_context_stack(trace, &trace->skip, new_sp, | ||
81 | S390_lowcore.thread_info, | 78 | S390_lowcore.thread_info, |
82 | S390_lowcore.thread_info + THREAD_SIZE); | 79 | S390_lowcore.thread_info + THREAD_SIZE); |
83 | return; | ||
84 | } | 80 | } |