x86: tsc.c rename tsc_khz shadow variable
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
Signed-off-by Jaswinder Singh Rajput <[email protected]>
--- arch/x86/kernel/tsc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/tsc.c +4 -4
@@ -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