* [PATCH -tip] x86: tsc.c rename tsc_khz shadow variable
@ 2009-04-09 13:15 Jaswinder Singh Rajput
0 siblings, 0 replies; only message in thread
From: Jaswinder Singh Rajput @ 2009-04-09 13:15 UTC (permalink / raw)
To: Ingo Molnar, x86 maintainers, LKML, Alok Kataria
Impact: fix sparse warning:
arch/x86/kernel/tsc.c:387:50: warning: symbol 'tsc_khz' shadows an earlier one
arch/x86/kernel/tsc.c:24:1: originally declared here
rename tsc_khz local variable to hv_tsc_khz to avoid shadow
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
arch/x86/kernel/tsc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 7a567eb..a8dc0d0 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -384,13 +384,13 @@ unsigned long native_calibrate_tsc(void)
{
u64 tsc1, tsc2, delta, ref1, ref2;
unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX;
- unsigned long flags, latch, ms, fast_calibrate, tsc_khz;
+ unsigned long flags, latch, ms, fast_calibrate, hv_tsc_khz;
int hpet = is_hpet_enabled(), i, loopmin;
- tsc_khz = get_hypervisor_tsc_freq();
- if (tsc_khz) {
+ hv_tsc_khz = get_hypervisor_tsc_freq();
+ if (hv_tsc_khz) {
printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
- return tsc_khz;
+ return hv_tsc_khz;
}
local_irq_save(flags);
--
1.6.0.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-09 13:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 13:15 [PATCH -tip] x86: tsc.c rename tsc_khz shadow variable Jaswinder Singh Rajput
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox