From: Jean Sacren <sakiwit@gmail.com>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Subject: [PATCH 1/1] acpi: Fix warning: 'num_cpus' may be used uninitialized in this function
Date: Sat, 11 Sep 2010 00:24:37 -0600 [thread overview]
Message-ID: <20100911062437.GA18711@mail.gmail.com> (raw)
In-Reply-To: <20100911062254.GA18705@mail.gmail.com>
warning: 'num_cpus' may be used uninitialized in this function
Initialize 'num_cpus' variable to zero so that gcc doesn't complain.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
drivers/acpi/acpi_pad.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index b76848c..6154f2b 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -429,7 +429,7 @@ static void acpi_pad_ost(acpi_handle handle, int stat,
static void acpi_pad_handle_notify(acpi_handle handle)
{
- int num_cpus;
+ int num_cpus = 0;
uint32_t idle_cpus;
mutex_lock(&isolated_cpus_lock);
--
1.7.1
next prev parent reply other threads:[~2010-09-11 6:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-11 6:22 [PATCH 0/1] acpi: Fix warning: 'num_cpus' may be used uninitialized in this function Jean Sacren
2010-09-11 6:24 ` Jean Sacren [this message]
2010-09-11 16:40 ` [PATCH 1/1] " Henrique de Moraes Holschuh
2010-09-13 0:39 ` Jean Sacren
2010-09-13 21:01 ` Henrique de Moraes Holschuh
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=20100911062437.GA18711@mail.gmail.com \
--to=sakiwit@gmail.com \
--cc=linux-acpi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox