x86: drop warning from mtrr: -Wunused-but-set-variable
PATCH 1/1 x86: drop warning from mtrr: -Wunused-but-set-variable
From: Bo Yu <[email protected]>
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 <[email protected]>
--- arch/x86/kernel/cpu/mtrr/cleanup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/cpu/mtrr/cleanup.c +1 -2
@@ -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;
Signature · 1 line
2.11.0
tip-bot for Bo Yu
merge bot[tip:x86/cleanups] x86/mtrr: Remove unused variable
x86/mtrr: Remove unused variable
Commit-ID: c81cd5c08d676483bb09f4809660d2a1abea0062 Gitweb: https://git.kernel.org/tip/c81cd5c08d676483bb09f4809660d2a1abea0062 Author: Bo Yu <[email protected]> AuthorDate: Fri, 8 Feb 2019 07:53:43 -0500 Committer: Thomas Gleixner <[email protected]> CommitDate: Fri, 8 Feb 2019 14:32:33 +0100
x86/mtrr: Remove unused variable
Compiling the kernel with W=1 results in the following warning:
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;
Remove the unused variable.
[ tglx: Massaged changelog ]
Signed-off-by Bo Yu <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- arch/x86/kernel/cpu/mtrr/cleanup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kernel/cpu/mtrr/cleanup.c +1 -2
@@ -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;