From: Yunfeng Ye <yeyunfeng@huawei.com>
To: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
<hpa@zytor.com>, <x86@kernel.org>, <luto@kernel.org>,
<riel@surriel.com>, <dave.hansen@intel.com>,
<yeyunfeng@huawei.com>, <longman@redhat.com>,
<mtosatti@redhat.com>, <linux-kernel@vger.kernel.org>,
"hushiyuan@huawei.com" <hushiyuan@huawei.com>,
"linfeilong@huawei.com" <linfeilong@huawei.com>
Subject: [PATCH] x86/process: remove unused variable in __switch_to_xtra()
Date: Tue, 17 Dec 2019 20:09:08 +0800 [thread overview]
Message-ID: <0efac42a-1631-d93d-d8a2-e6cf65cdf16b@huawei.com> (raw)
After the commit ecc7e37d4dad ("x86/io: Speedup schedule out of I/O
bitmap user") and commit 22fe5b0439dd ("x86/ioperm: Move TSS bitmap
update to exit to user work"), warning is found:
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]
struct thread_struct *prev, *next;
^~~~
arch/x86/kernel/process.c:618:24: warning: variable ‘prev’ set but not
used [-Wunused-but-set-variable]
struct thread_struct *prev, *next;
^~~~
Fix this by removing the unused variable @prev and @next;
Signed-off-by: Yunfeng Ye <yeyunfeng@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.7.4
next reply other threads:[~2019-12-17 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 12:09 Yunfeng Ye [this message]
2019-12-17 12:29 ` [PATCH] x86/process: remove unused variable in __switch_to_xtra() Borislav Petkov
2019-12-17 12:30 ` Yunfeng Ye
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=0efac42a-1631-d93d-d8a2-e6cf65cdf16b@huawei.com \
--to=yeyunfeng@huawei.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=hushiyuan@huawei.com \
--cc=linfeilong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=riel@surriel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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).