[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190208125343.11451-1-tsu.yubo@gmail.com>
Date: Fri, 8 Feb 2019 07:53:43 -0500
From: Bo YU <tsu.yubo@...il.com>
To: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
linux-kernel@...r.kernel.org
Cc: Bo Yu <tsu.yubo@...il.com>, hpa@...or.com, x86@...nel.org,
puwen@...on.cn
Subject: [PATCH] x86: drop warning from mtrr: -Wunused-but-set-variable
From: Bo Yu <tsu.yubo@...il.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@...il.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
Powered by blists - more mailing lists