From: Augusto Mecking Caringi <augustocaringi@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Augusto Mecking Caringi <augustocaringi@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] perf/x86: Fix 'may be used uninitialized' build warnings in core.c
Date: Thu, 5 Jan 2017 12:33:13 +0000 [thread overview]
Message-ID: <1483619607-11722-1-git-send-email-augustocaringi@gmail.com> (raw)
This patch fixes the following build warnings in core.c:
linux/arch/x86/events/core.c: In function ‘init_hw_perf_events’:
linux/include/linux/printk.h:292:2: warning: ‘reg_fail’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
linux/arch/x86/events/core.c:194:14: note: ‘reg_fail’ was declared here
int i, reg, reg_fail, ret = 0;
linux/include/linux/printk.h:292:2: warning: ‘val_fail’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
linux/arch/x86/events/core.c:193:11: note: ‘val_fail’ was declared here
u64 val, val_fail, val_new= ~0;
Signed-off-by: Augusto Mecking Caringi <augustocaringi@gmail.com>
---
arch/x86/events/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 019c588..f6e41b4 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -190,8 +190,8 @@ static void release_pmc_hardware(void) {}
static bool check_hw_exists(void)
{
- u64 val, val_fail, val_new= ~0;
- int i, reg, reg_fail, ret = 0;
+ u64 val, val_fail = 0, val_new= ~0;
+ int i, reg, reg_fail = 0, ret = 0;
int bios_fail = 0;
int reg_safe = -1;
--
2.7.4
next reply other threads:[~2017-01-05 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 12:33 Augusto Mecking Caringi [this message]
2017-01-12 8:30 ` Ingo Molnar
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=1483619607-11722-1-git-send-email-augustocaringi@gmail.com \
--to=augustocaringi@gmail.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome