Skip to content

Commit 3dd923f

Browse files
0x7f454c46torvalds
authored andcommitted
um/sysrq: remove needless variable sp
`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>
1 parent 13c6371 commit 3dd923f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎arch/um/kernel/sysrq.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ static const struct stacktrace_ops stackops = {
2727

2828
void show_stack(struct task_struct *task, unsigned long *stack)
2929
{
30-
unsigned long *sp = stack;
3130
struct pt_regs *segv_regs = current->thread.segv_regs;
3231
int i;
3332

@@ -38,10 +37,9 @@ void show_stack(struct task_struct *task, unsigned long *stack)
3837
}
3938

4039
if (!stack)
41-
sp = get_stack_pointer(task, segv_regs);
40+
stack = get_stack_pointer(task, segv_regs);
4241

4342
pr_info("Stack:\n");
44-
stack = sp;
4543
for (i = 0; i < 3 * STACKSLOTS_PER_LINE; i++) {
4644
if (kstack_end(stack))
4745
break;

0 commit comments

Comments
 (0)