From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Ashwin Chaugule <ashwin.chaugule@linaro.org>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] ACPI/CPPC: signedness bug in register_pcc_channel()
Date: Thu, 22 Oct 2015 19:52:59 +0000 [thread overview]
Message-ID: <20151022195259.GC24439@mwanda> (raw)
The "pcc_subspace_idx" is -1 if it hasn't been initialized yet. We need
it to be signed.
Fixes: 337aadff8e45 ('ACPI: Introduce CPU performance controls using CPPC')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index 0bbf84b..2ed5516 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -302,7 +302,7 @@ err_ret:
}
EXPORT_SYMBOL_GPL(acpi_get_psd_map);
-static int register_pcc_channel(unsigned pcc_subspace_idx)
+static int register_pcc_channel(int pcc_subspace_idx)
{
struct acpi_pcct_subspace *cppc_ss;
unsigned int len;
next reply other threads:[~2015-10-22 19:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 19:52 Dan Carpenter [this message]
2015-10-23 8:45 ` [patch] ACPI/CPPC: signedness bug in register_pcc_channel() Ashwin Chaugule
2015-10-28 2:48 ` Rafael J. Wysocki
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=20151022195259.GC24439@mwanda \
--to=dan.carpenter@oracle.com \
--cc=ashwin.chaugule@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).