simplify the stacktrace code
[linux-3.10.git] / arch / sh / kernel / stacktrace.c
index 0d5268a..4bdd2f8 100644 (file)
  */
 void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
 {
-       unsigned long *sp;
-
-       if (!task)
-               task = current;
-       if (task == current)
-               sp = (unsigned long *)current_stack_pointer;
-       else
-               sp = (unsigned long *)task->thread.sp;
+       unsigned long *sp = (unsigned long *)current_stack_pointer;
 
        while (!kstack_end(sp)) {
                unsigned long addr = *sp++;