From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: cpufreq@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] cpufreq: fix sign check of an unsigned variable in cpufreq-cpu0
Date: Mon, 25 Feb 2013 12:32:19 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.1302251227140.3030@axis700.grange> (raw)
A "< 0" test for an unsigned variable is meaningless, change the variable
to signed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
stable?
drivers/cpufreq/cpufreq-cpu0.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c
index 52bf36d..e7bad3c 100644
--- a/drivers/cpufreq/cpufreq-cpu0.c
+++ b/drivers/cpufreq/cpufreq-cpu0.c
@@ -44,7 +44,8 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
{
struct cpufreq_freqs freqs;
struct opp *opp;
- unsigned long freq_Hz, volt = 0, volt_old = 0, tol = 0;
+ unsigned long volt = 0, volt_old = 0, tol = 0;
+ long freq_Hz;
unsigned int index, cpu;
int ret;
--
1.7.2.5
next reply other threads:[~2013-02-25 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-25 11:32 Guennadi Liakhovetski [this message]
2013-02-25 12:09 ` Viresh Kumar
2013-02-25 18:42 ` Mike Turquette
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=Pine.LNX.4.64.1302251227140.3030@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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
all inboxes | Powered by JetHome®