cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@brodo.de>
To: davej@codemonkey.org.uk, paul.devriendt@amd.com,
	cpufreq@www.linux.org.uk
Subject: [PATCH] BUGFIX for powernow-k8
Date: Tue, 4 Nov 2003 15:51:01 +0100	[thread overview]
Message-ID: <20031104145100.GA6517@brodo.de> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1027 bytes --]

Hi Dave, Paul,

Here is an important bugfix for powernow-k8.c in its current form
(2.6.0-test9).

Problem description:
As the powernow-k8 driver uses the ->target and not the 
->setpolicy callback, cpufreq_policy->policy is always zero. Checking for it
in the powernow-k8 driver always returned "false". So we can easily remove
this invalid check (and the #warning added to denote this).

diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k8.c linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2003-11-04 15:27:33.609957704 +0100
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2003-11-04 15:39:36.410075384 +0100
@@ -935,10 +935,8 @@
 		return -ENODEV;
 	}
 
-#warning pol->policy is in undefined state here
 	res = find_match(&targ, &min, &max,
-			 pol->policy == CPUFREQ_POLICY_POWERSAVE ?
-			 SEARCH_DOWN : SEARCH_UP, 0, 0);
+			 SEARCH_DOWN, 0, 0);
 	if (!res) {
 		pol->min = min * 1000;
 		pol->max = max * 1000;

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Cpufreq mailing list
Cpufreq@www.linux.org.uk
http://www.linux.org.uk/mailman/listinfo/cpufreq

             reply	other threads:[~2003-11-04 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-04 14:51 Dominik Brodowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-04 17:29 [PATCH] BUGFIX for powernow-k8 paul.devriendt

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=20031104145100.GA6517@brodo.de \
    --to=linux@brodo.de \
    --cc=cpufreq@www.linux.org.uk \
    --cc=davej@codemonkey.org.uk \
    --cc=paul.devriendt@amd.com \
    /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