Skip to contentSkip to conversation

duplicate declaration of rq in sched_init()

PATCH William Lee Irwin III 1 participant 1 message Jun 2, 2002

lore
Share & tools
lore
#0 lore raw

I found this one while trying to straighten out bootstrap ordering issues elsewhere.

There appears to be a duplicate declaration of rq in sched_init(). This removes the nested declaration and otherwise leaves things alone.

Cheers,
Bill

===== kernel/sched.c 1.79 vs edited =====

kernel/sched.c +1 -1
@@ -1591,9 +1591,9 @@
 	int i, j, k;
 
 	for (i = 0; i < NR_CPUS; i++) {
-		runqueue_t *rq = cpu_rq(i);
 		prio_array_t *array;
 
+		rq = cpu_rq(i);
 		rq->active = rq->arrays;
 		rq->expired = rq->arrays + 1;
 		spin_lock_init(&rq->lock);