Skip to contentSkip to conversation

x86: tsc.c rename tsc_khz shadow variable

PATCH New Jaswinder Singh Rajput 1 participant 1 message Apr 9, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: tsc.c rename tsc_khz shadow variable

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

---
 arch/x86/kernel/tsc.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/tsc.c +4 -4
index 7a567eb..a8dc0d0 100644
@@ -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);
Signature · 1 line
1.6.0.6