aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-10-28 18:57:19 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-10-28 18:57:19 +0200
commite4dcba1c103dc28e927e004791e331aaf604383d (patch)
treea18094ecc54fcea2cb523a802e0c414c3e6f85bf /procps
parent776509544123c68bbc128c0fdb2f699062d294cf (diff)
downloadbusybox-e4dcba1c103dc28e927e004791e331aaf604383d.tar.gz
*: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
-rw-r--r--procps/powertop.c18
-rw-r--r--procps/renice.c6
2 files changed, 13 insertions, 11 deletions
diff --git a/procps/powertop.c b/procps/powertop.c
index 5e028f074..250da817b 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -39,7 +39,7 @@
/* Frequency of the ACPI timer */
#define FREQ_ACPI 3579.545
-#define FREQ_ACPI_1000 3579545
+#define FREQ_ACPI_1000 3579545
/* Max filename length of entry in /sys/devices subsystem */
#define BIG_SYSNAME_LEN 16
@@ -115,8 +115,8 @@ static int write_str_to_file(const char *fname, const char *str)
}
/* Make it more readable */
-#define start_timer() write_str_to_file("/proc/timer_stats", "1\n")
-#define stop_timer() write_str_to_file("/proc/timer_stats", "0\n")
+#define start_timer() write_str_to_file("/proc/timer_stats", "1\n")
+#define stop_timer() write_str_to_file("/proc/timer_stats", "0\n")
static NOINLINE void clear_lines(void)
{
@@ -362,7 +362,7 @@ static void process_irq_counts(void)
}
/* 0: 143646045 153901007 IO-APIC-edge timer
* NMI: 1 2 Non-maskable interrupts
- * ^
+ * ^
*/
if (nr < 20000) {
/* Skip to the interrupt name, e.g. 'timer' */
@@ -539,9 +539,9 @@ static void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
}
#endif
+#ifdef __i386__
static NOINLINE void print_intel_cstates(void)
{
-#ifdef __i386__
int bios_table[8] = { 0 };
int nbios = 0;
DIR *cpudir;
@@ -628,13 +628,15 @@ static NOINLINE void print_intel_cstates(void)
/* Print BIOS C-States */
printf("Your BIOS reports the following C-states: ");
- for (i = 0; i < 8; i++)
+ for (i = 0; i < ARRAY_SIZE(bios_table); i++)
if (bios_table[i])
printf("C%u ", i);
bb_putchar('\n');
-#endif
}
+#else
+# define print_intel_cstates(void) ((void)0)
+#endif
static void show_timerstats(void)
{
@@ -817,7 +819,7 @@ int powertop_main(int UNUSED_PARAM argc, char UNUSED_PARAM **argv)
sprintf(cstate_lines[0], "Cn\t\t Avg residency\n");
percentage = newticks * 100.0 / (G.total_cpus * DEFAULT_SLEEP * FREQ_ACPI_1000);
- sprintf(cstate_lines[1], "C0 (cpu running) (%4.1f%%)\n", percentage);
+ sprintf(cstate_lines[1], "C0 (cpu running) (%4.1f%%)\n", percentage);
/* Compute values for individual C-states */
for (i = 0; i < MAX_CSTATE_COUNT; i++) {
diff --git a/procps/renice.c b/procps/renice.c
index 0a73cbeeb..59194b5f4 100644
--- a/procps/renice.c
+++ b/procps/renice.c
@@ -32,7 +32,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv)
static const char Xetpriority_msg[] ALIGN1 = "%cetpriority";
int retval = EXIT_SUCCESS;
- int which = PRIO_PROCESS; /* Default 'which' value. */
+ int which = PRIO_PROCESS; /* Default 'which' value. */
int use_relative = 0;
int adjustment, new_priority;
unsigned who;
@@ -57,7 +57,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv)
arg += 2;
}
- if (!arg) { /* No args? Then show usage. */
+ if (!arg) { /* No args? Then show usage. */
bb_show_usage();
}
@@ -100,7 +100,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv)
if (use_relative) {
int old_priority;
- errno = 0; /* Needed for getpriority error detection. */
+ errno = 0; /* Needed for getpriority error detection. */
old_priority = getpriority(which, who);
if (errno) {
bb_perror_msg(Xetpriority_msg, 'g');