[PATCH] unnecessary long index i in sched

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unless we expect to have more than 4294967295 CPUs, there's no reason to
have 'i' as a long long here.

-- Steve

Signed-off-by: Steven Rostedt <[email protected]>

Index: linux-2.6.17-rc3-mm1/kernel/sched.c
===================================================================
--- linux-2.6.17-rc3-mm1.orig/kernel/sched.c	2006-05-13 13:08:42.000000000 -0400
+++ linux-2.6.17-rc3-mm1/kernel/sched.c	2006-05-13 13:09:59.000000000 -0400
@@ -1829,7 +1829,8 @@ unsigned long nr_uninterruptible(void)

 unsigned long long nr_context_switches(void)
 {
-	unsigned long long i, sum = 0;
+	int i;
+	unsigned long long sum = 0;

 	for_each_possible_cpu(i)
 		sum += cpu_rq(i)->nr_switches;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux