From: Dirk Mueller <dmueller-IBi9RG/b67k@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] make cpu_has_cpufreq() work
Date: Wed, 21 Dec 2005 04:46:48 +0100 [thread overview]
Message-ID: <200512210446.49494.dmueller@suse.com> (raw)
Hi,
it seems to me the return values of cpu_has_cpufreq in processor_thermal.c are
reversed. all callers check for if(!cpu_has_cpufreq()) return -ENODEV, which
indicates that it expects a return value of 0 for error, and nonzero for
success.
However the current implementation gets that reversed. the patch below fixes
it. Spotted by Thomas Renninger, and fixes the ACPI thermal code never
actually speedstepping the CPU when it overheats.
Signed-off-by: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Dirk Mueller <dmueller-IBi9RG/b67k@public.gmane.org>
--- processor_thermal.c.orig 2005-12-21 00:18:06.000000000 +0100
+++ processor_thermal.c 2005-12-21 00:18:23.000000000 +0100
@@ -102,8 +102,8 @@ static int cpu_has_cpufreq(unsigned int
{
struct cpufreq_policy policy;
if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu))
- return -ENODEV;
- return 0;
+ return 0;
+ return 1;
}
static int acpi_thermal_cpufreq_increase(unsigned int cpu)
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
reply other threads:[~2005-12-21 3:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200512210446.49494.dmueller@suse.com \
--to=dmueller-ibi9rg/b67k@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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