x86/process: Remove set but not used variables prev and next
authoryu kuai <yukuai3@huawei.com>
Fri, 13 Dec 2019 12:12:53 +0000 (20:12 +0800)
committerBorislav Petkov <bp@suse.de>
Sat, 14 Dec 2019 07:26:00 +0000 (08:26 +0100)
Remove two unused variables:

  arch/x86/kernel/process.c: In function ‘__switch_to_xtra’:
  arch/x86/kernel/process.c:618:31: warning: variable ‘next’ set but not used [-Wunused-but-set-variable]
    618 |  struct thread_struct *prev, *next;
        |                               ^~~~
  arch/x86/kernel/process.c:618:24: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable]
    618 |  struct thread_struct *prev, *next;
        |

They are never used and so can be removed.

Signed-off-by: yu kuai <yukuai3@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Cc: yi.zhang@huawei.com
Cc: zhengbin13@huawei.com
Link: https://lkml.kernel.org/r/20191213121253.10072-1-yukuai3@huawei.com
arch/x86/kernel/process.c

index 61e93a31898368f6a58a51c6fcb9c4d4269eac5b..839b5244e3b7e17767fc69bc610ac7c9a487c7fd 100644 (file)
@@ -615,12 +615,8 @@ void speculation_ctrl_update_current(void)
 
 void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)
 {
-       struct thread_struct *prev, *next;
        unsigned long tifp, tifn;
 
-       prev = &prev_p->thread;
-       next = &next_p->thread;
-
        tifn = READ_ONCE(task_thread_info(next_p)->flags);
        tifp = READ_ONCE(task_thread_info(prev_p)->flags);