From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] tools/power turbostat: decode MSR_MISC_FEATURE_CONTROL
Date: Sat, 04 Mar 2017 12:01:03 +0000 [thread overview]
Message-ID: <20170304120103.GA3292@mwanda> (raw)
Hello Len Brown,
The patch 33148d671cc1: "tools/power turbostat: decode
MSR_MISC_FEATURE_CONTROL" from Jan 21, 2017, leads to the following
static checker warning:
tools/power/x86/turbostat/turbostat.c:3918 decode_misc_feature_control()
warn: bitwise AND condition is false here
tools/power/x86/turbostat/turbostat.c
3908 void decode_misc_feature_control(void)
3909 {
3910 unsigned long long msr;
3911
3912 if (!has_misc_feature_control)
3913 return;
3914
3915 if (!get_msr(base_cpu, MSR_MISC_FEATURE_CONTROL, &msr))
3916 fprintf(outf, "cpu%d: MSR_MISC_FEATURE_CONTROL: 0x%08llx (%sL2-Prefetch %sL2-Prefetch-pair %sL1-Prefetch %sL1-IP-Prefetch)\n",
3917 base_cpu, msr,
3918 msr & (0 << 0) ? "No-" : "",
^^^^^^^^^^^^^
Never true.
3919 msr & (1 << 0) ? "No-" : "",
3920 msr & (2 << 0) ? "No-" : "",
3921 msr & (3 << 0) ? "No-" : "");
Was this supposed to be 1 << 0, 1 << 2 etc?
3922 }
regards,
dan carpenter
reply other threads:[~2017-03-04 12:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170304120103.GA3292@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.