From: Bo YU <tsu.yubo@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
linux-kernel@vger.kernel.org
Cc: Bo Yu <tsu.yubo@gmail.com>,
hpa@zytor.com, x86@kernel.org, puwen@hygon.cn
Subject: [PATCH] x86: drop warning from mtrr: -Wunused-but-set-variable
Date: Fri, 8 Feb 2019 07:53:43 -0500 [thread overview]
Message-ID: <20190208125343.11451-1-tsu.yubo@gmail.com> (raw)
From: Bo Yu <tsu.yubo@gmail.com>
There is a warning if enable W=1 when compile kernel:
arch/x86/kernel/cpu/mtrr/cleanup.c:299:16: warning: variable ‘second_basek’ set but not used [-Wunused-but-set-variable]
unsigned long second_basek, second_sizek;
Signed-off-by: Bo Yu <tsu.yubo@gmail.com>
---
arch/x86/kernel/cpu/mtrr/cleanup.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c
index 3668c5df90c6..5bd011737272 100644
--- a/arch/x86/kernel/cpu/mtrr/cleanup.c
+++ b/arch/x86/kernel/cpu/mtrr/cleanup.c
@@ -296,7 +296,7 @@ range_to_mtrr_with_hole(struct var_mtrr_state *state, unsigned long basek,
unsigned long sizek)
{
unsigned long hole_basek, hole_sizek;
- unsigned long second_basek, second_sizek;
+ unsigned long second_sizek;
unsigned long range0_basek, range0_sizek;
unsigned long range_basek, range_sizek;
unsigned long chunk_sizek;
@@ -304,7 +304,6 @@ range_to_mtrr_with_hole(struct var_mtrr_state *state, unsigned long basek,
hole_basek = 0;
hole_sizek = 0;
- second_basek = 0;
second_sizek = 0;
chunk_sizek = state->chunk_sizek;
gran_sizek = state->gran_sizek;
--
2.11.0
next reply other threads:[~2019-02-08 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 12:53 Bo YU [this message]
2019-02-08 13:37 ` [tip:x86/cleanups] x86/mtrr: Remove unused variable tip-bot for Bo Yu
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=20190208125343.11451-1-tsu.yubo@gmail.com \
--to=tsu.yubo@gmail.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=puwen@hygon.cn \
--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).