From: yu kuai <yukuai3@huawei.com>
To: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
<hpa@zytor.com>, <luto@kernel.org>, <riel@surriel.com>,
<alexander.h.duyck@linux.intel.com>, <mtosatti@redhat.com>
Cc: <yukuai3@huawei.com>, <zhengbin13@huawei.com>,
<yi.zhang@huawei.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86/process: remove set but not used varibles 'prev' and 'next'
Date: Fri, 13 Dec 2019 20:12:53 +0800 [thread overview]
Message-ID: <20191213121253.10072-1-yukuai3@huawei.com> (raw)
Fixes gcc '-Wunused-but-set-variable' warning:
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]
arch/x86/kernel/process.c:618:24: warning: variable ‘prev’ set
but not used [-Wunused-but-set-variable]
They are never used, and so can be removed.
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
arch/x86/kernel/process.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 61e93a318983..839b5244e3b7 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -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);
--
2.17.2
next reply other threads:[~2019-12-13 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 12:12 yu kuai [this message]
2019-12-14 7:41 ` [tip: x86/cleanups] x86/process: Remove set but not used variables prev and next tip-bot2 for yu kuai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191213121253.10072-1-yukuai3@huawei.com \
--to=yukuai3@huawei.com \
--cc=alexander.h.duyck@linux.intel.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=riel@surriel.com \
--cc=tglx@linutronix.de \
--cc=yi.zhang@huawei.com \
--cc=zhengbin13@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).