1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

o Fix whitespace bug introduced in the previous commit.

Submitted by:	ru

o Simplify p4tcc_power_profile().

Submitted by:	maxim
This commit is contained in:
Maxim Sobolev 2004-08-23 10:09:29 +00:00
parent acac9ce485
commit ae2f5301c8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134200
2 changed files with 8 additions and 24 deletions

View File

@ -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))

View File

@ -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))