mirror of https://gitee.com/openkylin/linux.git
cpupower: mperf monitor: Correct use of ! and &
In commit ae91d60ba8
, 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>
This commit is contained in:
parent
103f179071
commit
97fa1c5ca6
|
@ -237,7 +237,7 @@ static int init_maxfreq_mode(void)
|
|||
unsigned long long hwcr;
|
||||
unsigned long min;
|
||||
|
||||
if (!cpupower_cpu_info.caps & CPUPOWER_CAP_INV_TSC)
|
||||
if (!(cpupower_cpu_info.caps & CPUPOWER_CAP_INV_TSC))
|
||||
goto use_sysfs;
|
||||
|
||||
if (cpupower_cpu_info.vendor == X86_VENDOR_AMD) {
|
||||
|
|
Loading…
Reference in New Issue