From: Kulikov Vasiliy <segooon@gmail.com>
To: Kernel Janitors <kernel-janitors@vger.kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Don Zickus <dzickus@redhat.com>, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: [PATCH] kernel/watchdog: Initialize 'result'
Date: Mon, 05 Jul 2010 08:00:54 +0000 [thread overview]
Message-ID: <1278316854-28442-1-git-send-email-segooon@gmail.com> (raw)
Variable on the stack is not initialized to zero, do it explicitly.
This patch silences a compiler warning:
kernel/watchdog.c:463: warning: ‘result’ may be used uninitialized in this function
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
kernel/watchdog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 91b0b26..613bc1f 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -460,7 +460,7 @@ static void watchdog_disable(int cpu)
static void watchdog_enable_all_cpus(void)
{
int cpu;
- int result;
+ int result = 0;
for_each_online_cpu(cpu)
result += watchdog_enable(cpu);
--
1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Kulikov Vasiliy <segooon@gmail.com>
To: Kernel Janitors <kernel-janitors@vger.kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Don Zickus <dzickus@redhat.com>, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: [PATCH] kernel/watchdog: Initialize 'result'
Date: Mon, 5 Jul 2010 12:00:54 +0400 [thread overview]
Message-ID: <1278316854-28442-1-git-send-email-segooon@gmail.com> (raw)
Variable on the stack is not initialized to zero, do it explicitly.
This patch silences a compiler warning:
kernel/watchdog.c:463: warning: ‘result’ may be used uninitialized in this function
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
kernel/watchdog.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 91b0b26..613bc1f 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -460,7 +460,7 @@ static void watchdog_disable(int cpu)
static void watchdog_enable_all_cpus(void)
{
int cpu;
- int result;
+ int result = 0;
for_each_online_cpu(cpu)
result += watchdog_enable(cpu);
--
1.7.0.4
next reply other threads:[~2010-07-05 8:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-05 8:00 Kulikov Vasiliy [this message]
2010-07-05 8:00 ` [PATCH] kernel/watchdog: Initialize 'result' Kulikov Vasiliy
2010-07-06 13:23 ` Don Zickus
2010-07-06 13:23 ` Don Zickus
2010-07-07 8:03 ` [tip:perf/nmi] " tip-bot for Kulikov Vasiliy
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=1278316854-28442-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=dzickus@redhat.com \
--cc=fweisbec@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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.