]> git.baikalelectronics.ru Git - kernel.git/commitdiff
um/sysrq: remove needless variable sp
authorDmitry Safonov <dima@arista.com>
Tue, 9 Jun 2020 04:31:42 +0000 (21:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jun 2020 16:39:12 +0000 (09:39 -0700)
`sp' is a needless excercise here.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Link: http://lkml.kernel.org/r/20200418201944.482088-36-dima@arista.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/kernel/sysrq.c

index c71b5ef7ea8c3a29544301f34871ab03c4d875c2..c831a1c2eb94a79d48348759ed650f09e0cffd45 100644 (file)
@@ -27,7 +27,6 @@ static const struct stacktrace_ops stackops = {
 
 void show_stack(struct task_struct *task, unsigned long *stack)
 {
-       unsigned long *sp = stack;
        struct pt_regs *segv_regs = current->thread.segv_regs;
        int i;
 
@@ -38,10 +37,9 @@ void show_stack(struct task_struct *task, unsigned long *stack)
        }
 
        if (!stack)
-               sp = get_stack_pointer(task, segv_regs);
+               stack = get_stack_pointer(task, segv_regs);
 
        pr_info("Stack:\n");
-       stack = sp;
        for (i = 0; i < 3 * STACKSLOTS_PER_LINE; i++) {
                if (kstack_end(stack))
                        break;