aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/powerd
diff options
context:
space:
mode:
authorWarren Block <wblock@FreeBSD.org>2013-07-04 18:59:58 +0000
committerWarren Block <wblock@FreeBSD.org>2013-07-04 18:59:58 +0000
commit3e01326432725c62f5b1f9969f5aee4af10f81d2 (patch)
treeb6cb808ab27682ac160ed42f5d3c5bd8de313446 /usr.sbin/powerd
parent054a2dc11cf144954ce7bc9debb54e41a9280f39 (diff)
downloadsrc-3e01326432725c62f5b1f9969f5aee4af10f81d2.tar.gz
src-3e01326432725c62f5b1f9969f5aee4af10f81d2.zip
Whitespace fixes: remove tabs on blank links, spaces following content,
tabs after spaces. Reviewed by: gjb MFC after: 1 week
Notes
Notes: svn path=/head/; revision=252713
Diffstat (limited to 'usr.sbin/powerd')
-rw-r--r--usr.sbin/powerd/powerd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c
index 254c237b83ff..2c6eac2dff2f 100644
--- a/usr.sbin/powerd/powerd.c
+++ b/usr.sbin/powerd/powerd.c
@@ -154,7 +154,7 @@ read_usage_times(int *load)
error = sysctl(cp_times_mib, 2, cp_times, &cp_times_len, NULL, 0);
if (error)
return (error);
-
+
if (load) {
*load = 0;
for (cpu = 0; cpu < ncpus; cpu++) {
@@ -165,7 +165,7 @@ read_usage_times(int *load)
}
if (total == 0)
continue;
- *load += 100 - (cp_times[cpu * CPUSTATES + CP_IDLE] -
+ *load += 100 - (cp_times[cpu * CPUSTATES + CP_IDLE] -
cp_times_old[cpu * CPUSTATES + CP_IDLE]) * 100 / total;
}
}
@@ -236,7 +236,7 @@ get_freq(void)
{
size_t len;
int curfreq;
-
+
len = sizeof(curfreq);
if (sysctl(freq_mib, 4, &curfreq, &len, NULL, 0) != 0) {
if (vflag)
@@ -262,7 +262,7 @@ static int
get_freq_id(int freq, int *freqs, int numfreqs)
{
int i = 1;
-
+
while (i < numfreqs) {
if (freqs[i] < freq)
break;
@@ -717,7 +717,7 @@ main(int argc, char * argv[])
idle = 0;
if (set_freq(freq) != 0) {
warn("error setting CPU freq %d",
- freq);
+ freq);
continue;
}
}
@@ -730,7 +730,7 @@ main(int argc, char * argv[])
warn("read_usage_times() failed");
continue;
}
-
+
if (mode == MODE_ADAPTIVE) {
if (load > cpu_running_mark) {
if (load > 95 || load > cpu_running_mark * 2)
@@ -741,7 +741,7 @@ main(int argc, char * argv[])
freq = freqs[0];
} else if (load < cpu_idle_mark &&
curfreq * load < freqs[get_freq_id(
- freq * 7 / 8, freqs, numfreqs)] *
+ freq * 7 / 8, freqs, numfreqs)] *
cpu_running_mark) {
freq = freq * 7 / 8;
if (freq < freqs[numfreqs - 1])
@@ -757,7 +757,7 @@ main(int argc, char * argv[])
freq = freqs[0] * 2;
} else if (load < cpu_idle_mark / 2 &&
curfreq * load < freqs[get_freq_id(
- freq * 31 / 32, freqs, numfreqs)] *
+ freq * 31 / 32, freqs, numfreqs)] *
cpu_running_mark / 2) {
freq = freq * 31 / 32;
if (freq < freqs[numfreqs - 1])