]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/sched_debug.c
coda: convert struct class_device to struct device
[linux-2.6-omap-h63xx.git] / kernel / sched_debug.c
index ca198a797bfab87691616f05da95c16912bd105b..80fbbfc042909fb73ab5d1c8d96f3e114baf142f 100644 (file)
@@ -31,9 +31,9 @@
 /*
  * Ease the printing of nsec fields:
  */
-static long long nsec_high(long long nsec)
+static long long nsec_high(unsigned long long nsec)
 {
-       if (nsec < 0) {
+       if ((long long)nsec < 0) {
                nsec = -nsec;
                do_div(nsec, 1000000);
                return -nsec;
@@ -43,9 +43,9 @@ static long long nsec_high(long long nsec)
        return nsec;
 }
 
-static unsigned long nsec_low(long long nsec)
+static unsigned long nsec_low(unsigned long long nsec)
 {
-       if (nsec < 0)
+       if ((long long)nsec < 0)
                nsec = -nsec;
 
        return do_div(nsec, 1000000);
@@ -199,7 +199,7 @@ static int sched_debug_show(struct seq_file *m, void *v)
        u64 now = ktime_to_ns(ktime_get());
        int cpu;
 
-       SEQ_printf(m, "Sched Debug Version: v0.06-v22, %s %.*s\n",
+       SEQ_printf(m, "Sched Debug Version: v0.07, %s %.*s\n",
                init_utsname()->release,
                (int)strcspn(init_utsname()->version, " "),
                init_utsname()->version);
@@ -327,10 +327,12 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
                        avg_atom = -1LL;
 
                avg_per_cpu = p->se.sum_exec_runtime;
-               if (p->se.nr_migrations)
-                       avg_per_cpu = div64_64(avg_per_cpu, p->se.nr_migrations);
-               else
+               if (p->se.nr_migrations) {
+                       avg_per_cpu = div64_64(avg_per_cpu,
+                                              p->se.nr_migrations);
+               } else {
                        avg_per_cpu = -1LL;
+               }
 
                __PN(avg_atom);
                __PN(avg_per_cpu);