900876820b74142d9611509c8be94bddd51e5eb4 Issues on x86/kernel/tsc.c file. arch/x86/kernel/tsc.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index c9c4c7c..26d4aa1 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -495,7 +495,7 @@ static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin) * If the maximum is 10 times larger than the minimum, * then we got hit by an SMI as well. */ - if (pitcnt < loopmin || tscmax > 10 * tscmin) + if ((pitcnt < loopmin) || (tscmax > (10 * tscmin))) return ULONG_MAX; /* Calculate the PIT value */ @@ -543,7 +543,7 @@ static inline int pit_verify_msb(unsigned char val) { /* Ignore LSB */ inb(0x42); - return inb(0x42) == val; + return (inb(0x42) == val); } static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap) @@ -564,7 +564,7 @@ static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *de * We require _some_ success, but the quality control * will be based on the error terms on the TSC values. */ - return count > 5; + return (count > 5); } /* @@ -619,14 +619,14 @@ static unsigned long quick_pit_calibrate(void) * Extrapolate the error and fail fast if the error will * never be below 500 ppm. */ - if (i == 1 && - d1 + d2 >= (delta * MAX_QUICK_PIT_ITERATIONS) >> 11) + if ((i == 1) && + (d1 + d2) >= ((delta * MAX_QUICK_PIT_ITERATIONS) >> 11)) return 0; /* * Iterate until the error is less than 500 ppm */ - if (d1+d2 >= delta >> 11) + if ((d1+d2) >= (delta >> 11)) continue; /* @@ -740,7 +740,7 @@ unsigned long native_calibrate_tsc(void) continue; /* Check, whether the sampling was disturbed by an SMI */ - if (tsc1 == ULLONG_MAX || tsc2 == ULLONG_MAX) + if ((tsc1 == ULLONG_MAX) || (tsc2 == ULLONG_MAX)) continue; tsc2 = (tsc2 - tsc1) * 1000000LL; @@ -761,7 +761,7 @@ unsigned long native_calibrate_tsc(void) * succeeded. We break out of the loop right away. We * use the reference value, as it is more precise. */ - if (delta >= 90 && delta <= 110) { + if ((delta >= 90) && (delta <= 110)) { pr_info("PIT calibration matches %s. %d loops\n", hpet ? "HPET" : "PMTIMER", i + 1); return tsc_ref_min; @@ -773,7 +773,7 @@ unsigned long native_calibrate_tsc(void) * give the virtual PC a slightly longer timeframe for * the HPET/PMTIMER to make the result precise. */ - if (i == 1 && tsc_pit_min == ULONG_MAX) { + if ((i == 1) && (tsc_pit_min == ULONG_MAX)) { latch = CAL2_LATCH; ms = CAL2_MS; loopmin = CAL2_PIT_LOOPS; @@ -936,8 +936,8 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, loops_per_jiffy_ref = *lpj; tsc_khz_ref = tsc_khz; } - if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) || - (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) { + if (((val == CPUFREQ_PRECHANGE) && (freq->old < freq->new)) || + ((val == CPUFREQ_POSTCHANGE) && (freq->old > freq->new))) { *lpj = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new); tsc_khz = cpufreq_scale(tsc_khz_ref, ref_freq, freq->new); @@ -989,7 +989,7 @@ static void detect_art(void) /* Don't enable ART in a VM, non-stop TSC required */ if (boot_cpu_has(X86_FEATURE_HYPERVISOR) || !boot_cpu_has(X86_FEATURE_NONSTOP_TSC) || - art_to_tsc_denominator < ART_MIN_DENOMINATOR) + (art_to_tsc_denominator < ART_MIN_DENOMINATOR)) return; if (rdmsrl_safe(MSR_IA32_TSC_ADJUST, &art_to_tsc_offset)) @@ -1177,7 +1177,7 @@ static void tsc_refine_calibration_work(struct work_struct *work) goto out; /* Check, whether the sampling was disturbed by an SMI */ - if (tsc_start == ULLONG_MAX || tsc_stop == ULLONG_MAX) + if ((tsc_start == ULLONG_MAX) || (tsc_stop == ULLONG_MAX)) goto out; delta = tsc_stop - tsc_start; -- 2.7.4