aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-07-29 12:12:18 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-29 19:57:12 -0400
commit97fa1c5ca680bdee2c650e3aadf2a839b92f3f0e (patch)
tree4efcc07f960082dd85cf24dcb4894dde73558326 /tools/power
parent103f1790715e9a45f069ae1028331be0be1e3bce (diff)
cpupower: mperf monitor: Correct use of ! and &
In commit ae91d60ba88ef0bdb1b5e9b2363bd52fc45d2af7, a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. The Coccinelle semantic patch that makes this change is as follows: // <smpl> @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/cpupower/utils/idle_monitor/mperf_monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c b/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c
index 5650ab5a2c20..90a8c4f071e7 100644
--- a/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c
@@ -237,7 +237,7 @@ static int init_maxfreq_mode(void)
237 unsigned long long hwcr; 237 unsigned long long hwcr;
238 unsigned long min; 238 unsigned long min;
239 239
240 if (!cpupower_cpu_info.caps & CPUPOWER_CAP_INV_TSC) 240 if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_INV_TSC))
241 goto use_sysfs; 241 goto use_sysfs;
242 242
243 if (cpupower_cpu_info.vendor == X86_VENDOR_AMD) { 243 if (cpupower_cpu_info.vendor == X86_VENDOR_AMD) {