summaryrefslogtreecommitdiffstats
path: root/sys/i386/cpufreq
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2004-08-23 10:09:29 +0000
committersobomax <sobomax@FreeBSD.org>2004-08-23 10:09:29 +0000
commit42e3bb3749b1f307066866e91c7b92bf034eab6e (patch)
treebe52dca0d8950ae97341678e06e7b73d549e9237 /sys/i386/cpufreq
parentfe731a9733a7b3d4274a54761f8cf9ca846d036a (diff)
downloadFreeBSD-src-42e3bb3749b1f307066866e91c7b92bf034eab6e.zip
FreeBSD-src-42e3bb3749b1f307066866e91c7b92bf034eab6e.tar.gz
o Fix whitespace bug introduced in the previous commit.
Submitted by: ru o Simplify p4tcc_power_profile(). Submitted by: maxim
Diffstat (limited to 'sys/i386/cpufreq')
-rw-r--r--sys/i386/cpufreq/p4tcc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/i386/cpufreq/p4tcc.c b/sys/i386/cpufreq/p4tcc.c
index 84444c6..0603fb2 100644
--- a/sys/i386/cpufreq/p4tcc.c
+++ b/sys/i386/cpufreq/p4tcc.c
@@ -133,16 +133,9 @@ p4tcc_perf_sysctl(SYSCTL_HANDLER_ARGS)
static void
p4tcc_power_profile(void *arg)
{
- int state;
u_int new;
- state = power_profile_get_state();
- if (state != POWER_PROFILE_PERFORMANCE &&
- state != POWER_PROFILE_ECONOMY) {
- return;
- }
-
- switch (state) {
+ switch (power_profile_get_state()) {
case POWER_PROFILE_PERFORMANCE:
new = p4tcc_performance;
break;
@@ -150,8 +143,7 @@ p4tcc_power_profile(void *arg)
new = p4tcc_economy;
break;
default:
- new = p4tcc_getperf();
- break;
+ return;
}
if (p4tcc_getperf() != new) {
@@ -192,8 +184,8 @@ static void
setup_p4tcc(void *dummy __unused)
{
int nsteps, i;
- static char p4tcc_levels[(3 * TCC_LEVELS) + 1];
- char buf[4 + 1];
+ static char p4tcc_levels[(3 * TCC_LEVELS) + 1];
+ char buf[4 + 1];
if ((cpu_feature & (CPUID_ACPI | CPUID_TM)) !=
(CPUID_ACPI | CPUID_TM))
OpenPOWER on IntegriCloud