Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e90a2857c666913258528ce96decc43c749bbf95
Commit:     e90a2857c666913258528ce96decc43c749bbf95
Parent:     810cb5b32ded8f28880b502e984d807d03869d3b
Author:     Heiko Carstens <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 13:36:07 2007 +0200
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 13:36:19 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 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 515ff90..da69247 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -12,7 +12,6 @@
 #include <linux/kallsyms.h>
 
 static unsigned long save_context_stack(struct stack_trace *trace,
-                                       unsigned int *skip,
                                        unsigned long sp,
                                        unsigned long low,
                                        unsigned long high)
@@ -28,10 +27,10 @@ static unsigned long save_context_stack(struct stack_trace 
*trace,
                sf = (struct stack_frame *)sp;
                while(1) {
                        addr = sf->gprs[8] & PSW_ADDR_INSN;
-                       if (!(*skip))
+                       if (!trace->skip)
                                trace->entries[trace->nr_entries++] = addr;
                        else
-                               (*skip)--;
+                               trace->skip--;
                        if (trace->nr_entries >= trace->max_entries)
                                return sp;
                        low = sp;
@@ -48,10 +47,10 @@ static unsigned long save_context_stack(struct stack_trace 
*trace,
                        return sp;
                regs = (struct pt_regs *)sp;
                addr = regs->psw.addr & PSW_ADDR_INSN;
-               if (!(*skip))
+               if (!trace->skip)
                        trace->entries[trace->nr_entries++] = addr;
                else
-                       (*skip)--;
+                       trace->skip--;
                if (trace->nr_entries >= trace->max_entries)
                        return sp;
                low = sp;
@@ -65,20 +64,17 @@ void save_stack_trace(struct stack_trace *trace)
        unsigned long orig_sp, new_sp;
 
        orig_sp = sp & PSW_ADDR_INSN;
-
-       new_sp = save_context_stack(trace, &trace->skip, orig_sp,
-                               S390_lowcore.panic_stack - PAGE_SIZE,
-                               S390_lowcore.panic_stack);
+       new_sp = save_context_stack(trace, orig_sp,
+                                   S390_lowcore.panic_stack - PAGE_SIZE,
+                                   S390_lowcore.panic_stack);
        if (new_sp != orig_sp)
                return;
-       new_sp = save_context_stack(trace, &trace->skip, new_sp,
-                               S390_lowcore.async_stack - ASYNC_SIZE,
-                               S390_lowcore.async_stack);
+       new_sp = save_context_stack(trace, new_sp,
+                                   S390_lowcore.async_stack - ASYNC_SIZE,
+                                   S390_lowcore.async_stack);
        if (new_sp != orig_sp)
                return;
-
-       save_context_stack(trace, &trace->skip, new_sp,
+       save_context_stack(trace, new_sp,
                           S390_lowcore.thread_info,
                           S390_lowcore.thread_info + THREAD_SIZE);
-       return;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to