From: Chen Gong <gong.chen@linux.intel.com>
To: Bill Pemberton <wfp5p@virginia.edu>
Cc: trivial@kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI: acpi_pad: fix uninitialized variable warning
Date: Wed, 04 Aug 2010 11:46:23 +0800 [thread overview]
Message-ID: <4C58E28F.5080102@linux.intel.com> (raw)
In-Reply-To: <1280863052-31538-1-git-send-email-wfp5p@virginia.edu>
于 8/4/2010 3:17 AM, Bill Pemberton 写道:
> drivers/acpi/acpi_pad.c:432: warning: 'num_cpus' may be used
> uninitialized in this function
>
> num_cpus is set by the call to acpi_pad_pur()
>
> Signed-off-by: Bill Pemberton<wfp5p@virginia.edu>
> ---
> 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..69e2593 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 uninitialized_var(num_cpus);
> uint32_t idle_cpus;
>
> mutex_lock(&isolated_cpus_lock);
It is not necessary because the 1st usage of this variable is as
left-value, not right-value.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-08-04 3:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 19:17 [PATCH] ACPI: acpi_pad: fix uninitialized variable warning Bill Pemberton
2010-08-04 3:46 ` Chen Gong [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=4C58E28F.5080102@linux.intel.com \
--to=gong.chen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=trivial@kernel.org \
--cc=wfp5p@virginia.edu \
/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;
as well as URLs for NNTP newsgroup(s).