fix cpufreq flag handling
PATCH 1/1 fix cpufreq flag handling
Does anyone have a spare paper bag for me?
(!flags & SOME_FLAG)
is totally different to
(!(flags & SOME_FLAG))
and only the latter is valid...
arch/i386/kernel/timers/timer_tsc.c | 4 ++-- drivers/cpufreq/cpufreq.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/i386/kernel/timers/timer_tsc.c +2 -2
@@ -388,13 +388,13 @@if ((val ==CPUFREQ_PRECHANGE && freq->old < freq->new) || (val ==CPUFREQ_POSTCHANGE && freq->old > freq->new) || (val ==CPUFREQ_RESUMECHANGE )) { -if (!freq->flags &CPUFREQ_CONST_LOOPS ) +if (!(freq->flags &CPUFREQ_CONST_LOOPS )) cpu_data[freq->cpu].loops_per_jiffy =cpufreq_scale (loops_per_jiffy_ref, ref_freq, freq->new);#ifndef CONFIG_SMP if (cpu_khz) cpu_khz =cpufreq_scale (cpu_khz_ref, ref_freq, freq->new);if (use_tsc) { -if (!freq->flags &CPUFREQ_CONST_LOOPS ) { +if (!(freq->flags &CPUFREQ_CONST_LOOPS )) { fast_gettimeoffset_quotient =cpufreq_scale (fast_gettimeoffset_ref, freq->new, ref_freq);set_cyc2ns_scale (cpu_khz/1000 ); }
drivers/cpufreq/cpufreq.c +1 -1
@@ -600,7 +600,7 @@if (!cpu_policy)return -EINVAL ; -if (!cpufreq_driver->flags &CPUFREQ_CONST_LOOPS ) { +if (!(cpufreq_driver->flags &CPUFREQ_CONST_LOOPS )) {unsigned int cur_freq =0 ;if (cpufreq_driver->get)