projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d68ce01
)
x86, hyperv: Move a variable to avoid an unused variable warning
author
H. Peter Anvin
<
[email protected]
>
Wed, 6 Nov 2013 18:00:05 +0000
(10:00 -0800)
committer
H. Peter Anvin
<
[email protected]
>
Wed, 6 Nov 2013 18:02:05 +0000
(10:02 -0800)
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 <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: H. Peter Anvin <
[email protected]
>
arch/x86/kernel/cpu/mshyperv.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/cpu/mshyperv.c
b/arch/x86/kernel/cpu/mshyperv.c
index 9f6e9f89d9d615f24e8c7eadca69b6933c8a7a22..9f7ca266864a47cbb5484fead33a063d48f01f27 100644
(file)
--- 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;