summary refs log tree commit diff
path: root/arch/x86
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2013-11-06 10:00:05 -0800
committerH. Peter Anvin <hpa@zytor.com>2013-11-06 10:02:05 -0800
commit4c08edd305019061bf1ac95ce089497bdbb8b8ac (patch)
tree4c558f44f1d493c51ab9546ea9a17110b0762dd1 /arch/x86
parentd68ce0177c1e51fb332369e0c99852a6d05668af (diff)
downloadlinux-4c08edd305019061bf1ac95ce089497bdbb8b8ac.tar.gz
x86, hyperv: Move a variable to avoid an unused variable warning
The variable hv_lapic_frequency causes an unused variable warning if
CONFIG_X86_LOCAL_APIC is disabled.  Since the variable is only used
inside a small if statement, move the declaration of that variable
into the if statement itself.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Link: http://lkml.kernel.org/r/1381444224-3303-1-git-send-email-kys@microsoft.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/mshyperv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 9f6e9f89d9d6..9f7ca266864a 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -70,8 +70,6 @@ static struct clocksource hyperv_cs = {
 
 static void __init ms_hyperv_init_platform(void)
 {
-	u64	hv_lapic_frequency;
-
 	/*
 	 * Extract the features and hints
 	 */
@@ -86,6 +84,8 @@ static void __init ms_hyperv_init_platform(void)
 		/*
 		 * Get the APIC frequency.
 		 */
+		u64	hv_lapic_frequency;
+
 		rdmsrl(HV_X64_MSR_APIC_FREQUENCY, hv_lapic_frequency);
 		hv_lapic_frequency = div_u64(hv_lapic_frequency, HZ);
 		lapic_timer_frequency = hv_lapic_frequency;