From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Thomas Renninger <trenn@suse.de>
Cc: linux-pm@vger.kernel.org, Himangi Saraogi <himangi774@gmail.com>
Subject: Re: [PATCH 1/3] cpupower: mperf monitor: Correct use of ! and &
Date: Wed, 30 Jul 2014 02:28:11 +0200 [thread overview]
Message-ID: <2905082.LOmnC9giP0@vostro.rjw.lan> (raw)
In-Reply-To: <1406650340-38644-1-git-send-email-trenn@suse.de>
On Tuesday, July 29, 2014 06:12:18 PM Thomas Renninger wrote:
> From: Himangi Saraogi <himangi774@gmail.com>
>
> 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>
All three queued up for 3.17, thanks!
> ---
> .../cpupower/utils/idle_monitor/mperf_monitor.c | 2 +-
> 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 5650ab5..90a8c4f 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)
> 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) {
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
prev parent reply other threads:[~2014-07-30 0:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 14:05 [PATCH 0/4] tools/power/cpupower latest fixes Thomas Renninger
2014-07-22 14:05 ` [PATCH 1/4] cpupower: mperf monitor: Correct use of ! and & Thomas Renninger
2014-07-22 14:05 ` [PATCH 2/4] tools: power: cpupower: bench: parse.c: Fix several minor errors Thomas Renninger
2014-07-22 14:06 ` [PATCH 3/4] cpupower: Remove redundant error check Thomas Renninger
2014-07-22 14:06 ` [PATCH 4/4] cpupower: Adjust MAINTAINERS file Thomas Renninger
2014-07-22 23:53 ` [PATCH 0/4] tools/power/cpupower latest fixes Rafael J. Wysocki
2014-07-29 16:12 ` [PATCH 1/3] cpupower: mperf monitor: Correct use of ! and & Thomas Renninger
2014-07-29 16:12 ` [PATCH 2/3] tools: power: cpupower: bench: parse.c: Fix several minor errors Thomas Renninger
2014-07-29 16:12 ` [PATCH 3/3] cpupower: Remove redundant error check Thomas Renninger
2014-07-30 0:28 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2905082.LOmnC9giP0@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=himangi774@gmail.com \
--cc=linux-pm@vger.kernel.org \
--cc=trenn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox